朱鑫波 2 年 前
コミット
90984e922d
44 ファイル変更17172 行追加31 行削除
  1. 87 10
      package-lock.json
  2. 3 0
      package.json
  3. 261 0
      public/tinymce/langs/zh_CN.js
  4. 554 0
      public/tinymce/skins/lightgray/content.min.css
  5. 2159 0
      public/tinymce/skins/lightgray/skin.min.css
  6. 145 0
      src/api/goodsManagement/goods.js
  7. 78 0
      src/api/index.js
  8. 42 0
      src/api/policy/policy.js
  9. 44 0
      src/api/promoter/promoter.js
  10. 166 0
      src/api/supplyChain/supplyChain.js
  11. 2 2
      src/main.js
  12. 2 1
      src/store/getters.js
  13. 10 3
      src/store/modules/user.js
  14. 3 2
      src/utils/request.js
  15. 3 3
      src/utils/ruoyi.js
  16. 918 0
      src/views/goodsManagement/collectSample.vue
  17. 425 0
      src/views/goodsManagement/goodsDetail.vue
  18. 981 0
      src/views/goodsManagement/goodslist.vue
  19. 650 0
      src/views/goodsManagement/promoterSelect.vue
  20. 748 0
      src/views/goodsManagement/samplingDetail.vue
  21. 1116 0
      src/views/goodsManagement/samplingList.vue
  22. 253 0
      src/views/goodsManagement/selectTree.vue
  23. 822 0
      src/views/goodsManagement/setSampleCollection.vue
  24. 8 0
      src/views/goodsManagement/timeline-item/index.js
  25. 1 0
      src/views/goodsManagement/timeline-item/timeline-item.css
  26. 8 0
      src/views/goodsManagement/timeline/index.js
  27. 73 0
      src/views/goodsManagement/timeline/src/item.vue
  28. 38 0
      src/views/goodsManagement/timeline/src/main.vue
  29. 1 0
      src/views/goodsManagement/timeline/timeline.css
  30. 195 0
      src/views/goodsManagement/uploadEditor.vue
  31. 977 7
      src/views/index.vue
  32. 924 0
      src/views/policy/index.vue
  33. 653 0
      src/views/promoter/promoterDetail.vue
  34. 660 0
      src/views/promoter/promoterList.vue
  35. 582 0
      src/views/supplyChain/claim.vue
  36. 379 0
      src/views/supplyChain/claimOk.vue
  37. 524 0
      src/views/supplyChain/goods.vue
  38. 325 0
      src/views/supplyChain/goodsDetails.vue
  39. 360 0
      src/views/supplyChain/index.vue
  40. 580 0
      src/views/supplyChain/indexDetails.vue
  41. 360 0
      src/views/supplyChain/investment.vue
  42. 679 0
      src/views/supplyChain/investmentDetails.vue
  43. 370 0
      src/views/supplyChain/service.vue
  44. 3 3
      src/views/system/user/index.vue

+ 87 - 10
package-lock.json

@@ -1527,6 +1527,14 @@
       "integrity": "sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==",
       "dev": true
     },
+    "@tinymce/tinymce-vue": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmmirror.com/@tinymce/tinymce-vue/-/tinymce-vue-2.1.0.tgz",
+      "integrity": "sha512-lDIpeLbkaobS/f00wWaOhGJdiZLdtL0dEDYB4JvqgVeAAoaDFG2PvXXP/kN49xpHpUe8vOdt7xFaN48nrPmsbQ==",
+      "requires": {
+        "vue": "^2.5.17"
+      }
+    },
     "@types/glob": {
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
@@ -2825,6 +2833,16 @@
       "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
       "dev": true
     },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
     "bluebird": {
       "version": "3.7.2",
       "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
@@ -4275,9 +4293,9 @@
       }
     },
     "core-js": {
-      "version": "3.19.1",
-      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.1.tgz",
-      "integrity": "sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg=="
+      "version": "3.28.0",
+      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.28.0.tgz",
+      "integrity": "sha512-GiZn9D4Z/rSYvTeg1ljAIsEqFm0LaN9gVtwDCrKL80zHtS31p9BAjmTxVqTQDMpwlMolJZOFntUG2uwyj7DAqw=="
     },
     "core-js-compat": {
       "version": "3.22.7",
@@ -5067,6 +5085,21 @@
         }
       }
     },
+    "dom7": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmmirror.com/dom7/-/dom7-2.1.5.tgz",
+      "integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
+      "requires": {
+        "ssr-window": "^2.0.0"
+      },
+      "dependencies": {
+        "ssr-window": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmmirror.com/ssr-window/-/ssr-window-2.0.0.tgz",
+          "integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
+        }
+      }
+    },
     "domain-browser": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
@@ -6152,6 +6185,13 @@
       "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
       "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
     },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "dev": true,
+      "optional": true
+    },
     "filesize": {
       "version": "3.6.1",
       "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz",
@@ -6369,7 +6409,7 @@
     },
     "fsevents": {
       "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+      "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
       "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
       "dev": true,
       "optional": true
@@ -8874,6 +8914,13 @@
         "thenify-all": "^1.0.0"
       }
     },
+    "nan": {
+      "version": "2.17.0",
+      "resolved": "https://registry.npmmirror.com/nan/-/nan-2.17.0.tgz",
+      "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
+      "dev": true,
+      "optional": true
+    },
     "nanomatch": {
       "version": "1.2.13",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -9058,8 +9105,7 @@
     "object-assign": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
-      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
-      "dev": true
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
     },
     "object-copy": {
       "version": "0.1.0",
@@ -11780,6 +11826,11 @@
         "tweetnacl": "~0.14.0"
       }
     },
+    "ssr-window": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/ssr-window/-/ssr-window-1.0.1.tgz",
+      "integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
+    },
     "ssri": {
       "version": "6.0.2",
       "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
@@ -12343,6 +12394,15 @@
         }
       }
     },
+    "swiper": {
+      "version": "4.5.1",
+      "resolved": "https://registry.npmmirror.com/swiper/-/swiper-4.5.1.tgz",
+      "integrity": "sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==",
+      "requires": {
+        "dom7": "^2.1.3",
+        "ssr-window": "^1.0.1"
+      }
+    },
     "table": {
       "version": "5.4.6",
       "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
@@ -13183,6 +13243,15 @@
       "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz",
       "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg=="
     },
+    "vue-awesome-swiper": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmmirror.com/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
+      "integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
+      "requires": {
+        "object-assign": "^4.1.1",
+        "swiper": "^4.0.7"
+      }
+    },
     "vue-count-to": {
       "version": "1.0.13",
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
@@ -13457,10 +13526,14 @@
         },
         "fsevents": {
           "version": "1.2.13",
-          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+          "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz",
           "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
           "dev": true,
-          "optional": true
+          "optional": true,
+          "requires": {
+            "bindings": "^1.5.0",
+            "nan": "^2.12.1"
+          }
         },
         "glob-parent": {
           "version": "3.1.0",
@@ -13828,10 +13901,14 @@
         },
         "fsevents": {
           "version": "1.2.13",
-          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+          "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz",
           "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
           "dev": true,
-          "optional": true
+          "optional": true,
+          "requires": {
+            "bindings": "^1.5.0",
+            "nan": "^2.12.1"
+          }
         },
         "glob-parent": {
           "version": "3.1.0",

+ 3 - 0
package.json

@@ -37,6 +37,7 @@
   },
   "dependencies": {
     "@riophae/vue-treeselect": "0.4.0",
+    "@tinymce/tinymce-vue": "^2.0.0",
     "axios": "0.24.0",
     "clipboard": "2.0.8",
     "core-js": "^3.23.1",
@@ -53,7 +54,9 @@
     "quill": "1.3.7",
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",
+    "tinymce": "^5.6.0",
     "vue": "2.6.12",
+    "vue-awesome-swiper": "^3.1.3",
     "vue-count-to": "1.0.13",
     "vue-cropper": "0.5.5",
     "vue-meta": "2.4.0",

+ 261 - 0
public/tinymce/langs/zh_CN.js

@@ -0,0 +1,261 @@
+tinymce.addI18n('zh_CN', {
+  "Redo": "\u91cd\u590d",
+  "Undo": "\u64a4\u6d88",
+  "Cut": "\u526a\u5207",
+  "Copy": "\u590d\u5236",
+  "Paste": "\u7c98\u8d34",
+  "Select all": "\u5168\u9009",
+  "New document": "\u65b0\u6587\u6863",
+  "Ok": "\u786e\u5b9a",
+  "Cancel": "\u53d6\u6d88",
+  "Visual aids": "\u7f51\u683c\u7ebf",
+  "Bold": "\u7c97\u4f53",
+  "Italic": "\u659c\u4f53",
+  "Underline": "\u4e0b\u5212\u7ebf",
+  "Strikethrough": "\u5220\u9664\u7ebf",
+  "Superscript": "\u4e0a\u6807",
+  "Subscript": "\u4e0b\u6807",
+  "Clear formatting": "\u6e05\u9664\u683c\u5f0f",
+  "Align left": "\u5de6\u5bf9\u9f50",
+  "Align center": "\u5c45\u4e2d",
+  "Align right": "\u53f3\u5bf9\u9f50",
+  "Justify": "\u4e24\u7aef\u5bf9\u9f50",
+  "Bullet list": "\u9879\u76ee\u7b26\u53f7",
+  "Numbered list": "\u7f16\u53f7\u5217\u8868",
+  "Decrease indent": "\u51cf\u5c11\u7f29\u8fdb",
+  "Increase indent": "\u589e\u52a0\u7f29\u8fdb",
+  "Close": "\u5173\u95ed",
+  "Formats": "\u683c\u5f0f",
+  "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5bf9\u526a\u8d34\u677f\u7684\u8bbf\u95ee\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u952e\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002",
+  "Headers": "\u6807\u9898",
+  "Header 1": "\u6807\u98981",
+  "Header 2": "\u6807\u98982",
+  "Header 3": "\u6807\u98983",
+  "Header 4": "\u6807\u98984",
+  "Header 5": "\u6807\u98985",
+  "Header 6": "\u6807\u98986",
+  "Headings": "\u6807\u9898",
+  "Heading 1": "\u6807\u98981",
+  "Heading 2": "\u6807\u98982",
+  "Heading 3": "\u6807\u98983",
+  "Heading 4": "\u6807\u98984",
+  "Heading 5": "\u6807\u98985",
+  "Heading 6": "\u6807\u98986",
+  "Preformatted": "\u9884\u683c\u5f0f\u5316",
+  "Div": "Div\u533a\u5757",
+  "Pre": "\u9884\u683c\u5f0f\u6587\u672c",
+  "Code": "\u4ee3\u7801",
+  "Paragraph": "\u6bb5\u843d",
+  "Blockquote": "\u5f15\u7528",
+  "Inline": "\u6587\u672c",
+  "Blocks": "\u533a\u5757",
+  "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002",
+  "Font Family": "\u5b57\u4f53",
+  "Font Sizes": "\u5b57\u53f7",
+  "Class": "Class",
+  "Browse for an image": "\u6d4f\u89c8\u56fe\u50cf",
+  "OR": "\u6216",
+  "Drop an image here": "\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64",
+  "Upload": "\u4e0a\u4f20",
+  "Block": "\u5757",
+  "Align": "\u5bf9\u9f50",
+  "Default": "\u9ed8\u8ba4",
+  "Circle": "\u7a7a\u5fc3\u5706",
+  "Disc": "\u5b9e\u5fc3\u5706",
+  "Square": "\u65b9\u5757",
+  "Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd",
+  "Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd",
+  "Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd",
+  "Upper Alpha": "\u5927\u5199\u82f1\u6587\u5b57\u6bcd",
+  "Upper Roman": "\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd",
+  "Anchor": "\u951a\u70b9",
+  "Name": "\u540d\u79f0",
+  "Id": "\u6807\u8bc6\u7b26",
+  "Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002",
+  "You have unsaved changes are you sure you want to navigate away?": "\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f",
+  "Restore last draft": "\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f",
+  "Special character": "\u7279\u6b8a\u7b26\u53f7",
+  "Source code": "\u6e90\u4ee3\u7801",
+  "Insert\/Edit code sample": "\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b",
+  "Language": "\u8bed\u8a00",
+  "Code sample": "\u4ee3\u7801\u793a\u4f8b",
+  "Color": "\u989c\u8272",
+  "R": "R",
+  "G": "G",
+  "B": "B",
+  "Left to right": "\u4ece\u5de6\u5230\u53f3",
+  "Right to left": "\u4ece\u53f3\u5230\u5de6",
+  "Emoticons": "\u8868\u60c5",
+  "Document properties": "\u6587\u6863\u5c5e\u6027",
+  "Title": "\u6807\u9898",
+  "Keywords": "\u5173\u952e\u8bcd",
+  "Description": "\u63cf\u8ff0",
+  "Robots": "\u673a\u5668\u4eba",
+  "Author": "\u4f5c\u8005",
+  "Encoding": "\u7f16\u7801",
+  "Fullscreen": "\u5168\u5c4f",
+  "Action": "\u64cd\u4f5c",
+  "Shortcut": "\u5feb\u6377\u952e",
+  "Help": "\u5e2e\u52a9",
+  "Address": "\u5730\u5740",
+  "Focus to menubar": "\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f",
+  "Focus to toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f",
+  "Focus to element path": "\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84",
+  "Focus to contextual toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355",
+  "Insert link (if link plugin activated)": "\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
+  "Save (if save plugin activated)": "\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
+  "Find (if searchreplace plugin activated)": "\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)",
+  "Plugins installed ({0}):": "\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):",
+  "Premium plugins:": "\u4f18\u79c0\u63d2\u4ef6\uff1a",
+  "Learn more...": "\u4e86\u89e3\u66f4\u591a...",
+  "You are using {0}": "\u4f60\u6b63\u5728\u4f7f\u7528 {0}",
+  "Plugins": "\u63d2\u4ef6",
+  "Handy Shortcuts": "\u5feb\u6377\u952e",
+  "Horizontal line": "\u6c34\u5e73\u5206\u5272\u7ebf",
+  "Insert\/edit image": "\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247",
+  "Image description": "\u56fe\u7247\u63cf\u8ff0",
+  "Source": "\u5730\u5740",
+  "Dimensions": "\u5927\u5c0f",
+  "Constrain proportions": "\u4fdd\u6301\u7eb5\u6a2a\u6bd4",
+  "General": "\u666e\u901a",
+  "Advanced": "\u9ad8\u7ea7",
+  "Style": "\u6837\u5f0f",
+  "Vertical space": "\u5782\u76f4\u8fb9\u8ddd",
+  "Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd",
+  "Border": "\u8fb9\u6846",
+  "Insert image": "\u63d2\u5165\u56fe\u7247",
+  "Image": "\u56fe\u7247",
+  "Image list": "\u56fe\u7247\u5217\u8868",
+  "Rotate counterclockwise": "\u9006\u65f6\u9488\u65cb\u8f6c",
+  "Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c",
+  "Flip vertically": "\u5782\u76f4\u7ffb\u8f6c",
+  "Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c",
+  "Edit image": "\u7f16\u8f91\u56fe\u7247",
+  "Image options": "\u56fe\u7247\u9009\u9879",
+  "Zoom in": "\u653e\u5927",
+  "Zoom out": "\u7f29\u5c0f",
+  "Crop": "\u88c1\u526a",
+  "Resize": "\u8c03\u6574\u5927\u5c0f",
+  "Orientation": "\u65b9\u5411",
+  "Brightness": "\u4eae\u5ea6",
+  "Sharpen": "\u9510\u5316",
+  "Contrast": "\u5bf9\u6bd4\u5ea6",
+  "Color levels": "\u989c\u8272\u5c42\u6b21",
+  "Gamma": "\u4f3d\u9a6c\u503c",
+  "Invert": "\u53cd\u8f6c",
+  "Apply": "\u5e94\u7528",
+  "Back": "\u540e\u9000",
+  "Insert date\/time": "\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4",
+  "Date\/time": "\u65e5\u671f\/\u65f6\u95f4",
+  "Insert link": "\u63d2\u5165\u94fe\u63a5",
+  "Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",
+  "Text to display": "\u663e\u793a\u6587\u5b57",
+  "Url": "\u5730\u5740",
+  "Target": "\u6253\u5f00\u65b9\u5f0f",
+  "None": "\u65e0",
+  "New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00",
+  "Remove link": "\u5220\u9664\u94fe\u63a5",
+  "Anchors": "\u951a\u70b9",
+  "Link": "\u94fe\u63a5",
+  "Paste or type a link": "\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5",
+  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f",
+  "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f",
+  "Link list": "\u94fe\u63a5\u5217\u8868",
+  "Insert video": "\u63d2\u5165\u89c6\u9891",
+  "Insert\/edit video": "\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891",
+  "Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53",
+  "Alternative source": "\u955c\u50cf",
+  "Poster": "\u5c01\u9762",
+  "Paste your embed code below:": "\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:",
+  "Embed": "\u5185\u5d4c",
+  "Media": "\u5a92\u4f53",
+  "Nonbreaking space": "\u4e0d\u95f4\u65ad\u7a7a\u683c",
+  "Page break": "\u5206\u9875\u7b26",
+  "Paste as text": "\u7c98\u8d34\u4e3a\u6587\u672c",
+  "Preview": "\u9884\u89c8",
+  "Print": "\u6253\u5370",
+  "Save": "\u4fdd\u5b58",
+  "Find": "\u67e5\u627e",
+  "Replace with": "\u66ff\u6362\u4e3a",
+  "Replace": "\u66ff\u6362",
+  "Replace all": "\u5168\u90e8\u66ff\u6362",
+  "Prev": "\u4e0a\u4e00\u4e2a",
+  "Next": "\u4e0b\u4e00\u4e2a",
+  "Find and replace": "\u67e5\u627e\u548c\u66ff\u6362",
+  "Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.",
+  "Match case": "\u533a\u5206\u5927\u5c0f\u5199",
+  "Whole words": "\u5168\u5b57\u5339\u914d",
+  "Spellcheck": "\u62fc\u5199\u68c0\u67e5",
+  "Ignore": "\u5ffd\u7565",
+  "Ignore all": "\u5168\u90e8\u5ffd\u7565",
+  "Finish": "\u5b8c\u6210",
+  "Add to Dictionary": "\u6dfb\u52a0\u5230\u5b57\u5178",
+  "Insert table": "\u63d2\u5165\u8868\u683c",
+  "Table properties": "\u8868\u683c\u5c5e\u6027",
+  "Delete table": "\u5220\u9664\u8868\u683c",
+  "Cell": "\u5355\u5143\u683c",
+  "Row": "\u884c",
+  "Column": "\u5217",
+  "Cell properties": "\u5355\u5143\u683c\u5c5e\u6027",
+  "Merge cells": "\u5408\u5e76\u5355\u5143\u683c",
+  "Split cell": "\u62c6\u5206\u5355\u5143\u683c",
+  "Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165",
+  "Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165",
+  "Delete row": "\u5220\u9664\u884c",
+  "Row properties": "\u884c\u5c5e\u6027",
+  "Cut row": "\u526a\u5207\u884c",
+  "Copy row": "\u590d\u5236\u884c",
+  "Paste row before": "\u7c98\u8d34\u5230\u4e0a\u65b9",
+  "Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9",
+  "Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165",
+  "Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165",
+  "Delete column": "\u5220\u9664\u5217",
+  "Cols": "\u5217",
+  "Rows": "\u884c",
+  "Width": "\u5bbd",
+  "Height": "\u9ad8",
+  "Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd",
+  "Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd",
+  "Caption": "\u6807\u9898",
+  "Left": "\u5de6\u5bf9\u9f50",
+  "Center": "\u5c45\u4e2d",
+  "Right": "\u53f3\u5bf9\u9f50",
+  "Cell type": "\u5355\u5143\u683c\u7c7b\u578b",
+  "Scope": "\u8303\u56f4",
+  "Alignment": "\u5bf9\u9f50\u65b9\u5f0f",
+  "H Align": "\u6c34\u5e73\u5bf9\u9f50",
+  "V Align": "\u5782\u76f4\u5bf9\u9f50",
+  "Top": "\u9876\u90e8\u5bf9\u9f50",
+  "Middle": "\u5782\u76f4\u5c45\u4e2d",
+  "Bottom": "\u5e95\u90e8\u5bf9\u9f50",
+  "Header cell": "\u8868\u5934\u5355\u5143\u683c",
+  "Row group": "\u884c\u7ec4",
+  "Column group": "\u5217\u7ec4",
+  "Row type": "\u884c\u7c7b\u578b",
+  "Header": "\u8868\u5934",
+  "Body": "\u8868\u4f53",
+  "Footer": "\u8868\u5c3e",
+  "Border color": "\u8fb9\u6846\u989c\u8272",
+  "Insert template": "\u63d2\u5165\u6a21\u677f",
+  "Templates": "\u6a21\u677f",
+  "Template": "\u6a21\u677f",
+  "Text color": "\u6587\u5b57\u989c\u8272",
+  "Background color": "\u80cc\u666f\u8272",
+  "Custom...": "\u81ea\u5b9a\u4e49...",
+  "Custom color": "\u81ea\u5b9a\u4e49\u989c\u8272",
+  "No color": "\u65e0",
+  "Table of Contents": "\u5185\u5bb9\u5217\u8868",
+  "Show blocks": "\u663e\u793a\u533a\u5757\u8fb9\u6846",
+  "Show invisible characters": "\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26",
+  "Words: {0}": "\u5b57\u6570\uff1a{0}",
+  "{0} words": "{0} \u5b57",
+  "File": "\u6587\u4ef6",
+  "Edit": "\u7f16\u8f91",
+  "Insert": "\u63d2\u5165",
+  "View": "\u89c6\u56fe",
+  "Format": "\u683c\u5f0f",
+  "Table": "\u8868\u683c",
+  "Tools": "\u5de5\u5177",
+  "Powered by {0}": "\u7531{0}\u9a71\u52a8",
+  "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9"
+});

ファイルの差分が大きいため隠しています
+ 554 - 0
public/tinymce/skins/lightgray/content.min.css


ファイルの差分が大きいため隠しています
+ 2159 - 0
public/tinymce/skins/lightgray/skin.min.css


+ 145 - 0
src/api/goodsManagement/goods.js

@@ -0,0 +1,145 @@
+import request from '@/utils/request'
+
+// 预览商品
+export function getItemPreview(query) {
+    return request({
+        url: '/item/getItemPreview',
+        method: 'get',
+        params: query
+    })
+}
+
+// 获取商品列表
+export function getItemList(query) {
+    return request({
+        url: '/item/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 获取省
+export function getAreaList(query) {
+    return request({
+        url: '/item/getProvince',
+        method: 'get',
+        params: query
+    })
+}
+// 获取市
+export function getCity(query) {
+    return request({
+        url: '/item/getCity',
+        method: 'get',
+        params: query
+    })
+}
+
+// 判断是否绑定
+export function checkItem(query) {
+    return request({
+        url: '/item/checkItem',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 新增商品
+
+export function insertItem(query) {
+    return request({
+        url: '/item/insertItem',
+        method: 'post',
+        data: query
+    })
+}
+
+
+// 修改商品
+
+export function editItem(query) {
+    return request({
+        url: '/item/edit',
+        method: 'put',
+        data: query
+    })
+}
+
+//领样预览
+
+export function preview(query) {
+    return request({
+        url: '/itemCollectSamples/preview',
+        method: 'post',
+        data: query
+    })
+}
+
+//领样提交
+
+export function addPreview(query) {
+    return request({
+        url: '/itemCollectSamples/add',
+        method: 'post',
+        data: query
+    })
+}
+
+//领样修改
+
+export function editPreview(query) {
+    return request({
+        url: '/itemCollectSamples/edit',
+        method: 'put',
+        data: query
+    })
+}
+
+
+// 领样列表
+export function getList(query) {
+    return request({
+        url: '/itemCollectSamples/list',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 获取快递公司
+export function getCompany(query) {
+    return request({
+        url: '/itemCollectSamples/getCompany',
+        method: 'get',
+        params: query
+    })
+}
+
+
+//  详情
+export function getDetail(query) {
+    return request({
+        url: '/itemCollectSamples/detail',
+        method: 'get',
+        params: query
+    })
+}
+
+
+//  达人详情
+export function getPromoterInfo(query) {
+    return request({
+        url: '/kuaishou/promoter/getPromoterInfo',
+        method: 'get',
+        params: query
+    })
+}
+
+
+
+
+
+
+
+

+ 78 - 0
src/api/index.js

@@ -0,0 +1,78 @@
+import request from '@/utils/request'
+
+
+
+
+// 获取订单数据
+export function getIndexOrderInfo(query) {
+    return request({
+        url: '/isv/supply_chain/indexOrderInfo',
+        method: 'get',
+        params: query
+    })
+}
+
+// 获取服务费数据
+export function getIndexServiceAmountInfo(query) {
+    return request({
+        url: '/isv/supply_chain/indexServiceAmountInfo',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 获取金额数据
+export function getIndexAmountInfo(query) {
+    return request({
+        url: '/isv/supply_chain/indexAmountInfo',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 获取达人排行
+export function getIndexPromoterRank(query) {
+    return request({
+        url: '/isv/supply_chain/indexPromoterRank',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 获取商品排行
+export function getIndexOrderRank(query) {
+    return request({
+        url: '/isv/supply_chain/indexOrderRank',
+        method: 'get',
+        params: query
+    })
+}
+
+// 首页订单统计-echarts图表
+export function getIndexStatistics(query) {
+    return request({
+        url: '/isv/supply_chain/indexStatistics',
+        method: 'get',
+        params: query
+    })
+}
+
+
+// 首页时间段对比
+export function getTimeRatio(query) {
+    return request({
+        url: '/isv/supply_chain/indexTimeIntervalRatio',
+        method: 'get',
+        params: query
+    })
+}
+
+
+
+
+
+
+

+ 42 - 0
src/api/policy/policy.js

@@ -0,0 +1,42 @@
+import request from '@/utils/request'
+
+// 获取政策列表
+export function getSelectPolicyList(query) {
+    return request({
+        url: '/sale/saleFinacePolicyController/selectPolicyList',
+        method: 'get',
+        params: query
+    })
+}
+// 获取公司主体列表
+export function getSelectCompanySubjectInfoList(query) {
+    return request({
+        url: '/sale/saleFinacePolicyController/selectCompanySubjectInfoList',
+        method: 'get',
+        params: query
+    })
+}
+
+// 新增政策
+export function addSaleFinancePolicyInfo(query) {
+    return request({
+        url: '/sale/saleFinacePolicyController/addSaleFinancePolicyInfo',
+        method: 'post',
+        data: query
+    })
+}
+
+
+// 获取查询账户以及公司广告主列表
+export function getSelectPolicyCustomerList(query) {
+    return request({
+        url: '/sale/saleFinacePolicyController/selectPolicyCustomerList',
+        method: 'get',
+        params: query
+    })
+}
+
+
+
+
+

+ 44 - 0
src/api/promoter/promoter.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取达人列表
+export function getPromoterList(query) {
+    return request({
+        url: '/kuaishou/promoter/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 获取达人列表
+export function getPromoterDetail(query) {
+    return request({
+        url: '/kuaishou/promoter/getById',
+        method: 'get',
+        params: query
+    })
+}
+
+// 新增达人
+
+export function addPromoter(query) {
+    return request({
+        url: '/kuaishou/promoter/add',
+        method: 'post',
+        data: query
+    })
+}
+// 新增政策
+export function editPromoter(query) {
+    return request({
+        url: '/kuaishou/promoter/edit',
+        method: 'post',
+        data: query
+    })
+}
+
+
+
+
+
+
+

+ 166 - 0
src/api/supplyChain/supplyChain.js

@@ -0,0 +1,166 @@
+import request from '@/utils/request'
+
+/**
+ * 下载文件 用于excel导出
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function downFilePost(url, parameter) {
+  return request({
+    url: url,
+    data: parameter,
+    method: 'post',
+    responseType: 'blob',
+    timeout: 12000000, // 请求超时时间
+  })
+}
+
+// 获取达人top3
+export function getTopPromoterByItemId(query) {
+  return request({
+    url: '/isv/supply_chain/getTopPromoterByItemId',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 获取达人数据列表
+export function getOrderList(query) {
+  return request({
+    url: '/isv/supply_chain/orderList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 达人带货详情
+export function getOrderDetail(query) {
+  return request({
+    url: '/isv/supply_chain/anchorOrderDetail',
+    method: 'get',
+    params: query
+  })
+}
+
+// 订单统计
+export function getOrderStatistics(query) {
+  return request({
+    url: '/isv/supply_chain/orderStatistics',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 商品列表
+export function getItemList(query) {
+  return request({
+    url: '/isv/supply_chain/itemList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 商品详情
+export function getItemDetail(query) {
+  return request({
+    url: '/isv/supply_chain/itemDetail',
+    method: 'get',
+    params: query
+  })
+}
+
+// 产品服务费列表
+export function getItemServiceCharge(query) {
+  return request({
+    url: '/isv/supply_chain/itemServiceCharge',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-招商管理(人员列表)
+
+export function getSupplyChainUserList(query) {
+  return request({
+    url: '/isv/supply_chain/getSupplyChainUserList',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-招商管理页面
+export function getAdminReportList(query) {
+  return request({
+    url: '/isv/supply_chain/adminReportList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+//供应链列表-招商管理人员详情
+export function getUserItemDetail(query) {
+  return request({
+    url: '/isv/supply_chain/userItemDetail',
+    method: 'get',
+    params: query
+  })
+}
+
+
+//供应链列表-招商认领列表
+export function getBindUserItemList(query) {
+  return request({
+    url: '/isv/supply_chain/bindUserItemList',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-招商认领列表(解绑接口)
+export function getUnbindUser(query) {
+  return request({
+    url: '/isv/supply_chain/unbindUser',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-招商认领列表(绑定接口)
+export function getBindUser(query) {
+  return request({
+    url: '/isv/supply_chain/bindUser',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-商品数量
+export function getItemBindSummary(query) {
+  return request({
+    url: '/isv/supply_chain/itemBindSummary',
+    method: 'get',
+    params: query
+  })
+}
+
+
+//供应链列表-总计
+export function getUserItemTotal(query) {
+  return request({
+    url: '/isv/supply_chain/userItemTotal',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+
+
+
+

+ 2 - 2
src/main.js

@@ -13,7 +13,6 @@ import router from './router'
 import directive from './directive' // directive
 import plugins from './plugins' // plugins
 import { download } from '@/utils/request'
-
 import './assets/icons' // icon
 import './permission' // permission control
 import { getDicts } from "@/api/system/dict/data";
@@ -39,7 +38,7 @@ import VueMeta from 'vue-meta'
 import DictData from '@/components/DictData'
 // 投放时间段组件
 import ScheduleTime from "@/components/ScheduleTime"
-
+import qs from 'qs'
 
 // 全局方法挂载
 Vue.prototype.inputMoney = inputMoney
@@ -54,6 +53,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
+Vue.prototype.qs = qs
 
 // 全局组件挂载
 Vue.component('DictTag', DictTag)

+ 2 - 1
src/store/getters.js

@@ -14,6 +14,7 @@ const getters = {
   topbarRouters:state => state.permission.topbarRouters,
   defaultRoutes:state => state.permission.defaultRoutes,
   sidebarRouters:state => state.permission.sidebarRouters,
-  userId:state => state.user.userId
+  userId:state => state.user.userId,
+  remark:state => state.user.remark,
 }
 export default getters

+ 10 - 3
src/store/modules/user.js

@@ -8,7 +8,8 @@ const user = {
     avatar: '',
     roles: [],
     permissions: [],
-    userId:''
+    userId: '',
+    remark: ''
   },
 
   mutations: {
@@ -21,6 +22,9 @@ const user = {
     SET_USERID: (state, userId) => {
       state.userId = userId
     },
+    SET_REMARK: (state, remark) => {
+      state.remark = remark
+    },
     SET_AVATAR: (state, avatar) => {
       state.avatar = avatar
     },
@@ -56,6 +60,8 @@ const user = {
         getInfo().then(res => {
           const user = res.user
           const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
+          console.log(user)
+          localStorage.setItem('remark', res.user.remark)
           localStorage.setItem('userInfo', res.user.userId)
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', res.roles)
@@ -63,10 +69,11 @@ const user = {
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
-          commit('SET_NAME', user.userName)
+          commit('SET_NAME', user.nickName)
           commit('SET_AVATAR', avatar)
           commit('SET_USERID', user.userId)
-          
+          commit('SET_REMARK', user.remark)
+
           resolve(res)
         }).catch(error => {
           reject(error)

+ 3 - 2
src/utils/request.js

@@ -17,7 +17,8 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   // http://ruixuan.api.tjyourong.com.cn 线上
   // http://192.168.0.195:9003 测试
-  // http://192.168.1.59:9003 西安
+  // http://192.168.1.143:9003 西安
+  // http://192.168.0.216:9003 蒙蒙
   baseURL: 'http://192.168.0.195:9003',
   // 超时
   timeout: 300000
@@ -102,7 +103,7 @@ service.interceptors.response.use(res => {
         type: 'error'
       })
       return Promise.reject(new Error(msg))
-    } else if (code !== 200) {
+    } else if (code !== 200 && code !== 1) {
       Notification.error({
         title: msg
       })

+ 3 - 3
src/utils/ruoyi.js

@@ -54,7 +54,7 @@ export function resetForm(refName) {
 }
 
 // 添加日期范围
-export function addDateRange(params, dateRange, propName) {
+export function addDateRange(params, dateRange, propName,propNameEnd) {
   let search = params;
   search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
   dateRange = Array.isArray(dateRange) ? dateRange : [];
@@ -62,8 +62,8 @@ export function addDateRange(params, dateRange, propName) {
     search.params['beginTime'] = dateRange[0];
     search.params['endTime'] = dateRange[1];
   } else {
-    search.params['begin' + propName] = dateRange[0];
-    search.params['end' + propName] = dateRange[1];
+    search[propName] = dateRange[0];
+    search[propNameEnd] = dateRange[1];
   }
   return search;
 }

+ 918 - 0
src/views/goodsManagement/collectSample.vue

@@ -0,0 +1,918 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          placeholder="请输入商品名称"
+          style="width: 240px"
+          v-model="queryParams.itemTitle"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="商品ID" prop="itemId">
+        <el-input
+          placeholder="请输入商品ID"
+          style="width: 240px"
+          v-model="queryParams.itemId"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="addNew"
+          >领样申请</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      ref="multipleTable"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column
+        label="商品名称"
+        align="center"
+        prop="itemTitle"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.itemImgUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>商品单价: {{ scope.row.itemPrice / 100 }}元</p>
+
+              <p>
+                佣金率:
+                {{
+                  scope.row.commissionRate
+                    ? scope.row.commissionRate / 10 + "%"
+                    : "-"
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费"
+        align="center"
+        prop="regimentalPromotion"
+      >
+      </el-table-column>
+      <el-table-column
+        label="平台领样要求"
+        align="center"
+        prop="sampleRequirement"
+      >
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.sampleRequirement">
+            {{ scope.row.sampleRequirement }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="样品数量" align="center" prop="sampleCount">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.sampleCount">
+            {{ scope.row.sampleCount }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="领样人数" align="center" prop="remark">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.remark">
+            {{ scope.row.remark }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="领样份数" align="center" prop="remark">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.remark">
+            {{ scope.row.remark }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="activityItemStatus">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.activityItemStatus">
+            {{ scope.row.activityItemStatus | activityItemStatusName }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.createTime">
+            {{ scope.row.createTime.split(" ")[0] }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="手卡信息"
+        align="center"
+        prop="partnerRecommendText"
+      >
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.partnerRecommendText">
+            {{ scope.row.partnerRecommendText }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="归属人" align="center" prop="userName">
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="200px"
+      >
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" @click="okInfomation(scope.row)"
+            >领样申请</el-button
+          >
+          <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
+            >商品复制</el-button
+          >
+
+          <el-button size="mini" type="text" @click="toDetail(scope.row)"
+            >详情</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加直播 -->
+    <el-dialog
+      :title="!!ids ? '修改商品' : '新增商品'"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item label="创建人" prop="userName" style="width: 100%">
+          {{ $store.getters.name }}
+        </el-form-item>
+        <el-form-item label="活动ID" prop="activityId">
+          <el-input
+            placeholder="请输入活动ID"
+            style="width: 240px"
+            v-model="formBroadcast.activityId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品ID" prop="itemId">
+          <el-input
+            placeholder="请输入商品ID"
+            style="width: 240px"
+            v-model="formBroadcast.itemId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货地" prop="postArea">
+          <selectTree
+            :disabled="edit"
+            style="width: 240px"
+            v-model="formBroadcast.postArea"
+            filterable
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="不发货地区" prop="noPostArea">
+          <selectTree
+            style="width: 240px"
+            v-model="formBroadcast.noPostArea"
+            filterable
+            :multiple="true"
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="佣金比例" prop="commissionRate">
+          <el-input
+            placeholder="请输入佣金比例"
+            style="width: 240px"
+            v-model="formBroadcast.commissionRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费" prop="regimentalPromotion">
+          <el-input
+            placeholder="请输入服务费"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotion"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费率" prop="regimentalPromotionRate">
+          <el-input
+            placeholder="请输入服务费率"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotionRate"
+          >
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="领样要求" prop="sampleRequirement">
+          <el-input
+            placeholder="请输入领样要求"
+            style="width: 240px"
+            v-model="formBroadcast.sampleRequirement"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="样品数量" prop="sampleCount">
+          <el-input
+            placeholder="请输入样品数量"
+            style="width: 240px"
+            v-model="formBroadcast.sampleCount"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品链接" prop="detailUrl">
+          <el-input
+            placeholder="请输入商品链接"
+            style="width: 240px"
+            v-model="formBroadcast.detailUrl"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货率" prop="deliveryRate">
+          <el-input
+            placeholder="请输入发货率"
+            style="width: 240px"
+            v-model="formBroadcast.deliveryRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item
+          label="手卡内容"
+          prop="partnerRecommendText"
+          style="width: 100%"
+          class="entire-line"
+        >
+          <el-input
+            placeholder="请输入手卡内容"
+            style="width: 100%"
+            type="textarea"
+            :rows="2"
+            v-model="formBroadcast.partnerRecommendText"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="submitFormBroadcast"
+          :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <!-- 审核拒绝 -->
+    <el-dialog
+      title="拒绝原因"
+      :visible.sync="refuseVisible"
+      width="500px"
+      append-to-body
+    >
+      <el-input
+        placeholder="请输入拒绝原因"
+        style="width: 100%"
+        type="textarea"
+        :rows="2"
+        v-model="refuseInfo"
+      >
+      </el-input>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitRefuse" :loading="refuseLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            refuseLoading = false;
+            refuseVisible = false;
+            refuseInfo = null;
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import {
+  getItemList,
+  getAreaList,
+  getCity,
+  checkItem,
+  editItem,
+} from "@/api/goodsManagement/goods";
+import selectTree from "./selectTree.vue";
+export default {
+  name: "account-list",
+  components: {
+    selectTree,
+  },
+  data() {
+    const equalToPassword = (rule, value, callback) => {
+      if (!!value && !this.edit) {
+        checkItem({ itemId: value }).then((res) => {
+          if (res.message == "true") {
+            callback();
+          } else {
+            callback(new Error(res.message));
+          }
+        });
+      } else {
+        callback();
+      }
+    };
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      okIds: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      superiorList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemTitle: undefined,
+        itemId: undefined,
+        examineStatus: "2",
+      },
+      //页面所有的下拉数据
+      queryParamsList: {
+        tagList: [
+          { value: "2", label: "我的商品" },
+          { value: "1", label: "待审核" },
+          { value: "3", label: "审核拒绝" },
+        ],
+      },
+      // 表单参数
+      form: {},
+      formBroadcast: {},
+      //上传报表下拉数据
+      formList: {},
+      fileList: [],
+      accept: "",
+      //获取销售线索文件流
+      dateFile: new FormData(),
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {},
+      rulesBroadcast: {
+        itemId: [
+          {
+            required: true,
+            message: "商品ID必填",
+            trigger: "blur",
+          },
+          { required: true, validator: equalToPassword, trigger: "blur" },
+        ],
+        activityId: {
+          required: true,
+          message: "活动ID必填",
+          trigger: "blur",
+        },
+        postArea: {
+          required: true,
+          message: "发货地必选",
+          trigger: "change",
+        },
+        noPostArea: {
+          required: true,
+          message: "不发货地必选",
+          trigger: "change",
+        },
+        commissionRate: {
+          required: true,
+          message: "佣金比例必填",
+          trigger: "blur",
+        },
+        regimentalPromotion: {
+          required: true,
+          message: "服务费必填",
+          trigger: "blur",
+        },
+        regimentalPromotionRate: {
+          required: true,
+          message: "服务费率必填",
+          trigger: "blur",
+        },
+        sampleRequirement: {
+          required: true,
+          message: "领样要求必填",
+          trigger: "blur",
+        },
+        sampleCount: {
+          required: true,
+          message: "样品数量必填",
+          trigger: "blur",
+        },
+        partnerRecommendText: [
+          {
+            required: true,
+            message: "手卡内容必填",
+            trigger: "blur",
+          },
+          {
+            min: 5,
+            max: 200,
+            message: "手卡内容最少输入5个字符",
+            trigger: "change",
+          },
+        ],
+      },
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+      refuseVisible: false,
+      refuseLoading: false,
+      refuseInfo: null,
+      itemId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+  },
+  filters: {
+    activityItemStatusName(status) {
+      const statusMap = {
+        1: "待审核",
+        2: "审核通过",
+        3: "审核失败(拒绝)",
+        5: "失效",
+      };
+      return statusMap[status];
+    },
+  },
+  methods: {
+    handleSelectionChange(selection) {
+      this.okIds = selection.map((item) => item.itemId);
+    },
+    okInfomation(item) {
+      this.$router.replace({
+        path: "/goodsManagement/promoterSelect",
+        query: {
+          itemIds: JSON.stringify([item.itemId]),
+        },
+      });
+    },
+    toDetail(item) {
+      localStorage.setItem(
+        "addItemInfo",
+        JSON.stringify({ ...item, type: "look" })
+      );
+      this.$router.replace({
+        path: "/goodsManagement/goodsPreview",
+      });
+    },
+    copyInfomation(item) {
+      if (navigator.clipboard && window.isSecureContext) {
+        navigator.clipboard
+          .writeText(
+            `
+店铺: ${item.shopTitle}
+商品体验: ${item.shopScore}
+商家服务: ${item.mallServiceScore}
+产品: ${item.itemTitle}
+直播价: ¥${item.zkFinalPrice / 100}
+佣金比例: ${item.commissionRate}%
+团长推荐: ${item.partnerRecommendText}
+链接: ${item.detailUrl}`
+          )
+          .then(() => {
+            this.$message.success("复制成功");
+          })
+          .catch((err) => {
+            this.$message.error("复制失败");
+          });
+      } else {
+        // 创建text area
+        const textArea = document.createElement("textarea");
+        textArea.value = `
+店铺: ${item.shopTitle}
+商品体验: ${item.shopScore}
+商家服务: ${item.mallServiceScore}
+产品: ${item.itemTitle}
+直播价: ¥${item.zkFinalPrice / 100}
+佣金比例: ${item.commissionRate}%
+团长推荐: ${item.partnerRecommendText}
+链接: ${item.detailUrl}`;
+        // 使text area不在viewport,同时设置不可见
+        document.body.appendChild(textArea);
+        textArea.focus();
+        textArea.select();
+        return new Promise((resolve, reject) => {
+          // 执行复制命令并移除文本框
+          document.execCommand("copy")
+            ? resolve()
+            : reject(new Error("出错了"));
+          textArea.remove();
+        }).then(
+          () => {
+            this.$message.success("复制成功");
+          },
+          () => {
+            this.$message.error("复制失败");
+          }
+        );
+      }
+    },
+    submitRefuse() {
+      if (!!this.refuseInfo) {
+        var params = {};
+        params.itemId = this.itemId;
+        params.examineStatus = 3;
+        params.refuseDetail = this.refuseInfo;
+        params.examineId = this.$store.getters.userId;
+        params.examineName = this.$store.getters.name;
+        editItem(params)
+          .then((res) => {
+            this.refuseVisible = false;
+            this.refuseLoading = false;
+            this.getList();
+            this.$modal.msgSuccess("已拒绝");
+          })
+          .catch(() => {
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请输入拒绝原因");
+      }
+    },
+    getAreaList() {
+      getAreaList().then((res) => {
+        this.superiorList = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+            disabled: true,
+          };
+        });
+      });
+    },
+    loadNode(node, resolve) {
+      if (node.level === 0) {
+        return resolve([{ name: "region" }]);
+      }
+      if (node.level > 1) return resolve([]);
+
+      console.log(node);
+      getCity({ province: node.data.id }).then((res) => {
+        const data = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+          };
+        });
+        resolve(data);
+      });
+      //   setTimeout(() => {
+      //     const data = [
+      //       {
+      //         name: "leaf",
+      //         leaf: true,
+      //       },
+      //       {
+      //         name: "zone",
+      //       },
+      //     ];
+
+      //     resolve(data);
+      //   }, 500);
+    },
+    handleNodeClick(val) {
+      console.log(val);
+      this.$set(this.formBroadcast, "postArea", val.id);
+      this.$set(this.formBroadcast, "postAreaName", val.name);
+      if (!val.children || val.children.length == 0) {
+        this.$refs.selectReport.blur();
+      }
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+
+      getItemList({ ...this.queryParams }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("formBroadcast");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    addNew() {
+      this.getAreaList();
+      this.openAllocation = true;
+      this.edit = false;
+      this.ids = null;
+      this.confirmLoading = false;
+      this.formBroadcast = {};
+      setTimeout(() => {
+        this.$refs.formBroadcast.clearValidate();
+      }, 0);
+    },
+    /** 编辑地址 新增达人*/
+    handleAddbroadcast(item) {
+      this.getAreaList();
+      this.$nextTick(() => {
+        this.ids = item.itemId;
+        this.edit = true;
+        this.openAllocation = true;
+        this.$set(this.formBroadcast, "activityId", item.activityId);
+        this.$set(this.formBroadcast, "itemId", item.itemId);
+        this.$set(this.formBroadcast, "postArea", item.postArea);
+        this.$set(this.formBroadcast, "noPostArea", item.noPostArea);
+        this.$set(this.formBroadcast, "commissionRate", item.commissionRate);
+
+        this.$set(
+          this.formBroadcast,
+          "regimentalPromotion",
+          item.regimentalPromotion
+        );
+        this.$set(
+          this.formBroadcast,
+          "regimentalPromotionRate",
+          item.regimentalPromotionRate
+        );
+        this.$set(
+          this.formBroadcast,
+          "sampleRequirement",
+          item.sampleRequirement
+        );
+        this.$set(this.formBroadcast, "sampleCount", item.sampleCount);
+        this.$set(this.formBroadcast, "detailUrl", item.detailUrl);
+        this.$set(this.formBroadcast, "deliveryRate", item.deliveryRate);
+        this.$set(
+          this.formBroadcast,
+          "partnerRecommendText",
+          item.partnerRecommendText
+        );
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+    },
+    /** 新增直播确定按钮 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          if (!this.edit) {
+            localStorage.setItem(
+              "addItemInfo",
+              JSON.stringify(this.formBroadcast)
+            );
+            this.$router.replace({
+              path: "/goodsManagement/goodsPreview",
+            });
+          } else {
+            this.confirmLoading = true;
+            var params = { ...this.formBroadcast };
+            params.examineStatus = 1;
+            editItem(params)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.openAllocation = false;
+                this.formBroadcast = {};
+                this.getList();
+                this.$modal.msgSuccess("修改成功");
+              })
+              .catch(() => {
+                this.confirmLoading = false;
+                this.$message.error("失败");
+              });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          var fileList = this.$refs.fileUploadDialog.fileList;
+          var dapanUrls = this.$refs.fileUpload.fileList;
+          var portraitUrls = this.$refs.fileUploadFx.fileList;
+          if (
+            fileList.length == 0 &&
+            dapanUrls.length == 0 &&
+            portraitUrls.length == 0
+          ) {
+            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
+            return;
+          } else {
+            this.confirmLoading = true;
+            let formData = new FormData();
+            this.ids;
+            formData.append("id", this.ids);
+            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
+            formData.append(
+              "dapanUrls",
+              JSON.stringify(
+                dapanUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            formData.append(
+              "portraitUrls",
+              JSON.stringify(
+                portraitUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            fileList.forEach((file) => formData.append("files", file.raw));
+            dataUpload(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("上传成功");
+                this.open = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+          console.log(fileList, dapanUrls, portraitUrls);
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+</style>
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-tabs__content {
+  overflow: initial;
+}
+</style>

+ 425 - 0
src/views/goodsManagement/goodsDetail.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="app-container">
+    <el-card
+      shadow="never"
+      class="card-show"
+      v-if="itemJson"
+      style="margin-bottom: 24px"
+    >
+      <div>
+        <h3 style="font-weight: blod">
+          {{ itemJson.itemTitle }}({{ itemJson.itemId }})
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            @click="addNew"
+            style="float: right"
+            :loading="loading"
+            v-if="itemInfo.type != 'look'"
+            >新增</el-button
+          >
+        </h3>
+      </div>
+    </el-card>
+    <el-row :gutter="24" v-if="itemJson">
+      <el-col :span="6">
+        <el-card shadow="never" class="card-show">
+          <div>
+            <img
+              :src="itemJson.itemImgUrl"
+              alt=""
+              style="width: 100%; height: auto"
+            />
+          </div>
+          <div>
+            <div class="swiper">
+              <swiper ref="mySwiper" :options="swiperOptions">
+                <swiper-slide
+                  v-for="(item, index) in itemJson.itemGalleryUrls"
+                  :key="index"
+                >
+                  <el-image
+                    style="width: 100%; height: auto"
+                    :src="item"
+                    :preview-src-list="itemJson.itemGalleryUrls"
+                  >
+                  </el-image>
+                </swiper-slide>
+                <div class="swiper-pagination" slot="pagination"></div>
+              </swiper>
+            </div>
+          </div>
+        </el-card>
+      </el-col>
+      <el-col :span="18" v-if="itemJson">
+        <el-card shadow="never" class="card-show">
+          <el-card shadow="never" class="card-show">
+            <h4><span class="prefix"></span>基本信息</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <p>
+                店铺名称:{{
+                  judgeStatus == 2
+                    ? itemJson.sellerNickName
+                    : itemJson.shopTitle
+                }}
+              </p>
+              <p v-if="judgeStatus == 1">
+                小店星级:{{ itemJson.shopStar }} | 小店评分:{{
+                  itemJson.shopScore
+                }}
+              </p>
+              <p v-if="judgeStatus == 1">
+                店铺服务分:{{ itemJson.mallServiceScore }} | 店铺质量分:{{
+                  itemJson.mallQualityScore
+                }}
+              </p>
+
+              <p v-if="judgeStatus == 1">
+                到手价格:¥{{ itemJson.zkFinalPrice / 100 }}元
+              </p>
+              <p v-if="judgeStatus == 2">
+                商品价格:¥{{ itemJson.itemPrice / 100 }}元
+              </p>
+              <p v-if="judgeStatus == 1">
+                预估服务费:{{ itemInfo.regimentalPromotion }}
+              </p>
+              <p v-if="judgeStatus == 2">
+                预估服务费率:{{ itemJson.investmentPromotionRate }}%
+              </p>
+              <p>佣金率:{{ itemInfo.commissionRate }}%</p>
+              <p>
+                领样要求:{{ itemInfo.sampleRequirement }} | 样品数量:{{
+                  itemInfo.sampleCount
+                }}
+              </p>
+              <p>
+                类目:{{
+                  judgeStatus == 1
+                    ? itemJson.categoryName
+                    : itemJson.itemCategoryName
+                }}
+              </p>
+
+              <p v-if="judgeStatus == 2">商品状态:下架</p>
+
+              <p>
+                商品链接:<a
+                  style="display: inline"
+                  :href="itemJson.detailUrl"
+                  target="_block"
+                  >{{ itemJson.detailUrl }}</a
+                >
+              </p>
+            </div>
+          </el-card>
+          <el-card
+            shadow="never"
+            class="card-show main-top"
+            v-if="judgeStatus == 1"
+          >
+            <h4><span class="prefix"></span>商品信息</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <p v-for="(item, index) in itemJson.skuList" :key="index">
+                ¥{{ item.skuPrice / 100 }}元 | {{ item.specification }}
+              </p>
+            </div>
+          </el-card>
+          <el-card shadow="never" class="card-show main-top">
+            <h4><span class="prefix"></span>发货信息</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <p>发货地:{{ itemInfo.postArea }}</p>
+              <p>未发货地区:{{ itemInfo.noPostArea }}</p>
+              <p>发货时间:48小时内发货</p>
+              <p>发货率:{{ itemInfo.deliveryRate }}</p>
+            </div>
+          </el-card>
+          <el-card shadow="never" class="card-show main-top">
+            <h4><span class="prefix"></span>商品卖点</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <p>{{ itemInfo.partnerRecommendText }}</p>
+            </div>
+          </el-card>
+          <el-card
+            shadow="never"
+            class="card-show main-top"
+            v-if="judgeStatus == 1"
+          >
+            <h4><span class="prefix"></span>商品备注</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <pre>{{ itemJson.itemDesc }}</pre>
+            </div>
+          </el-card>
+          <el-card
+            shadow="never"
+            class="card-show main-top"
+            v-if="judgeStatus == 1"
+          >
+            <h4><span class="prefix"></span>商品详情</h4>
+            <div
+              style="
+                width: 100%;
+                display: flex;
+                flex-wrap: wrap;
+                justify-content: space-between;
+              "
+              class="item-name-calss dh-data"
+            >
+              <el-image
+                style="width: 200px; height: 200px; margin-bottom: 20px"
+                :src="item"
+                :previewSrcList="itemJson.itemDescUrls"
+                v-for="(item, index) in itemJson.itemDescUrls"
+                :key="index"
+              >
+              </el-image>
+              <div
+                v-for="i in 4"
+                :key="i"
+                style="
+                  height: 0;
+                  margin-bottom: 0;
+                  border: none;
+                  padding: 0;
+                  width: 200px;
+                "
+              ></div>
+            </div>
+          </el-card>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { getItemPreview, insertItem } from "@/api/goodsManagement/goods";
+import { swiper, swiperSlide } from "vue-awesome-swiper";
+import "swiper/dist/css/swiper.css";
+export default {
+  name: "goods-preview",
+  components: {
+    swiper,
+    swiperSlide,
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 选中数组
+      ids: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      superiorList: [],
+      // 查询参数
+      itemInfo: null,
+      itemJson: null,
+      timer: null,
+      theSpeed: this.speed,
+      imgWidth: 260,
+      swiperOptions: {
+        pagination: {
+          el: ".swiper-pagination", //与slot="pagination"处 class 一致
+          clickable: true, //轮播按钮支持点击
+        },
+        slidesPerView: 3,
+        paginationClickable: true,
+        spaceBetween: 30,
+      },
+      judgeStatus: 1,
+    };
+  },
+  created() {
+    this.itemInfo = JSON.parse(localStorage.getItem("addItemInfo"));
+    console.log(this.itemInfo);
+  },
+  mounted() {
+    this.getItemPreview();
+    this.$nextTick(() => {});
+  },
+  filters: {},
+  watch: {},
+  methods: {
+    getItemPreview() {
+      getItemPreview({
+        activityId: this.itemInfo.activityId,
+        itemId: this.itemInfo.itemId,
+      }).then((res) => {
+        this.itemJson = res.itemJson;
+        this.judgeStatus = res.judgeStatus;
+      });
+    },
+    addNew() {
+      this.loading = true;
+      if (this.judgeStatus == 1) {
+        var params = {
+          ...this.itemInfo,
+          ...this.itemJson,
+          userId: this.$store.getters.userId,
+          userName: this.$store.getters.name,
+          itemGalleryUrls: this.itemJson.itemGalleryUrls
+            ? JSON.stringify(this.itemJson.itemGalleryUrls)
+            : null,
+          itemDescUrls: this.itemJson.itemDescUrls
+            ? JSON.stringify(this.itemJson.itemDescUrls)
+            : null,
+          skuList: this.itemJson.skuList
+            ? JSON.stringify(this.itemJson.skuList)
+            : null,
+        };
+      } else if (this.judgeStatus == 2) {
+        var params = {
+          ...this.itemInfo,
+          userId: this.$store.getters.userId,
+          userName: this.$store.getters.name,
+          itemImgUrl: this.itemJson.itemImgUrl,
+          itemTitle: this.itemJson.itemTitle,
+          shopTitle: this.itemJson.sellerNickName,
+          itemPrice: this.itemJson.itemPrice,
+          zkFinalPrice: this.itemJson.itemPrice,
+          skuPrice: this.itemJson.itemPrice,
+          categoryName: this.itemJson.itemCategoryName,
+          activityItemStatus: 5,
+          detailUrl: this.itemJson.detailUrl,
+        };
+      }
+
+      insertItem(params).then((res) => {
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-tabs__content {
+  overflow: initial;
+}
+
+.main-top {
+  margin-top: 24px;
+}
+
+.swiper {
+  width: 100%;
+  margin-top: 20px;
+  & >>> .swiper-container {
+    width: 100%;
+    .swiper-slide {
+      width: 100%;
+      padding-bottom: 28.1%;
+      background-size: cover;
+      background-position: center center;
+      background-repeat: no-repeat;
+
+      /* Center slide text vertically */
+      display: -webkit-box;
+      display: -ms-flexbox;
+      display: -webkit-flex;
+      display: flex;
+      -webkit-box-pack: center;
+      -ms-flex-pack: center;
+      -webkit-justify-content: center;
+      justify-content: center;
+      -webkit-box-align: center;
+      -ms-flex-align: center;
+      -webkit-align-items: center;
+      align-items: center;
+    }
+
+    .swiper-pagination {
+      .swiper-pagination-bullet-active {
+        background-color: #f29b76;
+      }
+    }
+  }
+  .swiper-pagination-fraction,
+  .swiper-pagination-custom,
+  .swiper-container-horizontal > .swiper-pagination-bullets {
+    display: none;
+  }
+}
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+  line-height: 30px;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+  line-height: 30px;
+}
+.tableBox {
+  width: 100%;
+}
+.prefix {
+  display: inline-block;
+  width: 3px;
+  height: 15px;
+  background: rgb(104, 163, 253);
+  position: relative;
+  top: 2px;
+  margin-right: 5px;
+}
+.dh p {
+  font-size: 14px;
+}
+.dh-data p {
+  font-size: 16px;
+}
+.main-box {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+}
+</style>

+ 981 - 0
src/views/goodsManagement/goodslist.vue

@@ -0,0 +1,981 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          placeholder="请输入商品名称"
+          style="width: 240px"
+          v-model="queryParams.itemTitle"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="商品ID" prop="itemId">
+        <el-input
+          placeholder="请输入商品ID"
+          style="width: 240px"
+          v-model="queryParams.itemId"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="addNew"
+          >新增商品</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-tabs v-model="queryParams.examineStatus" @tab-click="handleClick">
+      <el-tab-pane
+        :label="item.label"
+        :name="item.value"
+        v-for="(item, index) in queryParamsList.tagList"
+        :key="index"
+      >
+        <el-table v-loading="loading" :data="typeList" ref="multipleTable">
+          <el-table-column
+            label="商品名称"
+            align="center"
+            prop="itemTitle"
+            width="300"
+          >
+            <template slot-scope="scope">
+              <div style="display: flex; width: 100%">
+                <div style="width: 40%">
+                  <img
+                    :src="scope.row.itemImgUrl"
+                    alt=""
+                    style="width: 70px; height: auto"
+                  />
+                </div>
+                <div style="width: 60%" class="item-name-calss">
+                  <a
+                    style="
+                      text-overflow: ellipsis;
+                      white-space: nowrap;
+                      overflow: hidden;
+                      width: 100%;
+                    "
+                    :title="scope.row.itemTitle"
+                  >
+                    {{ scope.row.itemTitle }}
+                  </a>
+                  <p>商品Id: {{ scope.row.itemId }}</p>
+                  <p>商品单价: {{ scope.row.itemPrice / 100 }}元</p>
+
+                  <p>
+                    佣金率:
+                    {{
+                      scope.row.commissionRate
+                        ? scope.row.commissionRate / 10 + "%"
+                        : "-"
+                    }}
+                  </p>
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="预估服务费"
+            align="center"
+            prop="regimentalPromotion"
+          >
+          </el-table-column>
+          <el-table-column
+            label="平台领样要求"
+            align="center"
+            prop="sampleRequirement"
+          >
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.sampleRequirement">
+                {{ scope.row.sampleRequirement }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="样品数量" align="center" prop="sampleCount">
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.sampleCount">
+                {{ scope.row.sampleCount }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column label="领样人数" align="center" prop="sampleCount">
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.sampleCount">
+                {{ scope.row.sampleCount }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="领样份数" align="center" prop="sampleCount">
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.sampleCount">
+                {{ scope.row.sampleCount }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column> -->
+          <el-table-column
+            label="状态"
+            align="center"
+            prop="activityItemStatus"
+          >
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.activityItemStatus">
+                {{ scope.row.activityItemStatus | activityItemStatusName }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" align="center" prop="createTime">
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.createTime">
+                {{ scope.row.createTime.split(" ")[0] }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="手卡信息"
+            align="center"
+            prop="partnerRecommendText"
+          >
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.partnerRecommendText">
+                {{ scope.row.partnerRecommendText }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            label="拒绝原因"
+            align="center"
+            prop="refuseDetail"
+            v-if="queryParams.examineStatus == 3"
+          >
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.refuseDetail">
+                {{ scope.row.refuseDetail }}
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="操作"
+            align="center"
+            class-name="small-padding fixed-width"
+            width="200px"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                @click="copyInfomation(scope.row)"
+                v-if="queryParams.examineStatus == '2'"
+                >商品复制</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                @click="okInfomation(scope.row)"
+                v-if="queryParams.examineStatus == '1'"
+                :disabled="
+                  $store.getters.roles[0] != 'admin' &&
+                  $store.getters.roles[0] != 'supplyChainAdmin'
+                "
+                >通过</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                @click="
+                  itemId = scope.row.itemId;
+                  refuseVisible = true;
+                "
+                v-if="queryParams.examineStatus == '1'"
+                :disabled="
+                  $store.getters.roles[0] != 'admin' &&
+                  $store.getters.roles[0] != 'supplyChainAdmin'
+                "
+                >拒绝</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleAddbroadcast(scope.row)"
+                v-if="queryParams.examineStatus == '3'"
+                >编辑</el-button
+              >
+              <el-button size="mini" type="text" @click="toDetail(scope.row)"
+                >详情</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-tab-pane>
+    </el-tabs>
+
+    <!-- 添加直播 -->
+    <el-dialog
+      :title="!!ids ? '修改商品' : '新增商品'"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item label="创建人" prop="userName" style="width: 100%">
+          {{ $store.getters.name }}
+        </el-form-item>
+        <el-form-item label="活动ID" prop="activityId">
+          <el-input
+            placeholder="请输入活动ID"
+            style="width: 240px"
+            v-model="formBroadcast.activityId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品ID" prop="itemId">
+          <el-input
+            placeholder="请输入商品ID"
+            style="width: 240px"
+            v-model="formBroadcast.itemId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货地" prop="postArea">
+          <selectTree
+            :disabled="edit"
+            style="width: 240px"
+            v-model="formBroadcast.postArea"
+            filterable
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="不发货地区" prop="noPostArea">
+          <selectTree
+            style="width: 240px"
+            v-model="formBroadcast.noPostArea"
+            filterable
+            :multiple="true"
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="佣金比例" prop="commissionRate">
+          <el-input
+            placeholder="请输入佣金比例"
+            style="width: 240px"
+            v-model="formBroadcast.commissionRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费" prop="regimentalPromotion">
+          <el-input
+            placeholder="请输入服务费"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotion"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费率" prop="regimentalPromotionRate">
+          <el-input
+            placeholder="请输入服务费率"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotionRate"
+          >
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="领样要求" prop="sampleRequirement">
+          <el-input
+            placeholder="请输入领样要求"
+            style="width: 240px"
+            v-model="formBroadcast.sampleRequirement"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="样品数量" prop="sampleCount">
+          <el-input
+            placeholder="请输入样品数量"
+            style="width: 240px"
+            v-model="formBroadcast.sampleCount"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品链接" prop="detailUrl">
+          <el-input
+            placeholder="请输入商品链接"
+            style="width: 240px"
+            v-model="formBroadcast.detailUrl"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货率" prop="deliveryRate">
+          <el-input
+            placeholder="请输入发货率"
+            style="width: 240px"
+            v-model="formBroadcast.deliveryRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item
+          label="手卡内容"
+          prop="partnerRecommendText"
+          style="width: 100%"
+          class="entire-line"
+        >
+          <el-input
+            placeholder="请输入手卡内容"
+            style="width: 100%"
+            type="textarea"
+            :rows="2"
+            v-model="formBroadcast.partnerRecommendText"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="submitFormBroadcast"
+          :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <!-- 审核拒绝 -->
+    <el-dialog
+      title="拒绝原因"
+      :visible.sync="refuseVisible"
+      width="500px"
+      append-to-body
+    >
+      <el-input
+        placeholder="请输入拒绝原因"
+        style="width: 100%"
+        type="textarea"
+        :rows="2"
+        v-model="refuseInfo"
+      >
+      </el-input>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitRefuse" :loading="refuseLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            refuseLoading = false;
+            refuseVisible = false;
+            refuseInfo = null;
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import {
+  getItemList,
+  getAreaList,
+  getCity,
+  checkItem,
+  editItem,
+} from "@/api/goodsManagement/goods";
+import selectTree from "./selectTree.vue";
+export default {
+  name: "account-list",
+  components: {
+    selectTree,
+  },
+  data() {
+    const equalToPassword = (rule, value, callback) => {
+      if (!!value && !this.edit) {
+        checkItem({ itemId: value }).then((res) => {
+          if (res.message == "true") {
+            callback();
+          } else {
+            callback(new Error(res.message));
+          }
+        });
+      } else {
+        callback();
+      }
+    };
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      superiorList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemTitle: undefined,
+        itemId: undefined,
+        examineStatus: "2",
+      },
+      //页面所有的下拉数据
+      queryParamsList: {
+        tagList: [
+          { value: "2", label: "我的商品" },
+          { value: "1", label: "待审核" },
+          { value: "3", label: "审核拒绝" },
+        ],
+      },
+      // 表单参数
+      form: {},
+      formBroadcast: {},
+      //上传报表下拉数据
+      formList: {},
+      fileList: [],
+      accept: "",
+      //获取销售线索文件流
+      dateFile: new FormData(),
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {},
+      rulesBroadcast: {
+        itemId: [
+          {
+            required: true,
+            message: "商品ID必填",
+            trigger: "blur",
+          },
+          { required: true, validator: equalToPassword, trigger: "blur" },
+        ],
+        activityId: {
+          required: true,
+          message: "活动ID必填",
+          trigger: "blur",
+        },
+        postArea: {
+          required: true,
+          message: "发货地必选",
+          trigger: "change",
+        },
+        noPostArea: {
+          required: true,
+          message: "不发货地必选",
+          trigger: "change",
+        },
+        commissionRate: {
+          required: true,
+          message: "佣金比例必填",
+          trigger: "blur",
+        },
+        regimentalPromotion: {
+          required: true,
+          message: "服务费必填",
+          trigger: "blur",
+        },
+        regimentalPromotionRate: {
+          required: true,
+          message: "服务费率必填",
+          trigger: "blur",
+        },
+        sampleRequirement: {
+          required: true,
+          message: "领样要求必填",
+          trigger: "blur",
+        },
+        sampleCount: {
+          required: true,
+          message: "样品数量必填",
+          trigger: "blur",
+        },
+        partnerRecommendText: [
+          {
+            required: true,
+            message: "手卡内容必填",
+            trigger: "blur",
+          },
+          {
+            min: 5,
+            max: 200,
+            message: "手卡内容最少输入5个字符",
+            trigger: "change",
+          },
+        ],
+      },
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+      refuseVisible: false,
+      refuseLoading: false,
+      refuseInfo: null,
+      itemId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+  },
+  filters: {
+    activityItemStatusName(status) {
+      const statusMap = {
+        1: "待审核",
+        2: "审核通过",
+        3: "审核失败(拒绝)",
+        5: "失效",
+      };
+      return statusMap[status];
+    },
+  },
+  methods: {
+    toDetail(item) {
+      localStorage.setItem(
+        "addItemInfo",
+        JSON.stringify({ ...item, type: "look" })
+      );
+      this.$router.replace({
+        path: "/goodsManagement/goodsPreview",
+      });
+    },
+    copyInfomation(item) {
+      if (navigator.clipboard && window.isSecureContext) {
+        navigator.clipboard
+          .writeText(`
+店铺: ${item.shopTitle}
+商品体验: ${item.shopScore}
+商家服务: ${item.mallServiceScore}
+产品: ${item.itemTitle}
+直播价: ¥${item.zkFinalPrice / 100}
+佣金比例: ${item.commissionRate}%
+团长推荐: ${item.partnerRecommendText}
+链接: ${item.detailUrl}`
+          )
+          .then(() => {
+            this.$message.success("复制成功");
+          })
+          .catch((err) => {
+            this.$message.error("复制失败");
+          });
+      } else {
+        // 创建text area
+        const textArea = document.createElement("textarea");
+        textArea.value =`
+店铺: ${item.shopTitle}
+商品体验: ${item.shopScore}
+商家服务: ${item.mallServiceScore}
+产品: ${item.itemTitle}
+直播价: ¥${item.zkFinalPrice / 100}
+佣金比例: ${item.commissionRate}%
+团长推荐: ${item.partnerRecommendText}
+链接: ${item.detailUrl}`
+        // 使text area不在viewport,同时设置不可见
+        document.body.appendChild(textArea);
+        textArea.focus();
+        textArea.select();
+        return new Promise((resolve, reject) => {
+          // 执行复制命令并移除文本框
+          document.execCommand("copy")
+            ? resolve()
+            : reject(new Error("出错了"));
+          textArea.remove();
+        }).then(
+          () => {
+            this.$message.success("复制成功");
+          },
+          () => {
+            this.$message.error("复制失败");
+          }
+        );
+      }
+    },
+    submitRefuse() {
+      if (!!this.refuseInfo) {
+        var params = {};
+        params.itemId = this.itemId;
+        params.examineStatus = 3;
+        params.refuseDetail = this.refuseInfo;
+        params.examineId = this.$store.getters.userId;
+        params.examineName = this.$store.getters.name;
+        editItem(params)
+          .then((res) => {
+            this.refuseVisible = false;
+            this.refuseLoading = false;
+            this.getList();
+            this.$modal.msgSuccess("已拒绝");
+          })
+          .catch(() => {
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请输入拒绝原因");
+      }
+    },
+    okInfomation(item) {
+      this.$modal
+        .confirm(`请确认是否审核通过该商品信息?`)
+        .then(() => {
+          var params = {};
+          params.itemId = item.itemId;
+          params.examineStatus = 2;
+          params.examineId = this.$store.getters.userId;
+          params.examineName = this.$store.getters.name;
+          editItem(params)
+            .then((res) => {
+              this.getList();
+              this.$modal.msgSuccess("审核通过");
+            })
+            .catch(() => {
+              this.$message.error("失败");
+            });
+        })
+        .catch(() => {});
+    },
+    getAreaList() {
+      getAreaList().then((res) => {
+        this.superiorList = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+            disabled: true,
+          };
+        });
+      });
+    },
+    loadNode(node, resolve) {
+      if (node.level === 0) {
+        return resolve([{ name: "region" }]);
+      }
+      if (node.level > 1) return resolve([]);
+
+      console.log(node);
+      getCity({ province: node.data.id }).then((res) => {
+        const data = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+          };
+        });
+        resolve(data);
+      });
+      //   setTimeout(() => {
+      //     const data = [
+      //       {
+      //         name: "leaf",
+      //         leaf: true,
+      //       },
+      //       {
+      //         name: "zone",
+      //       },
+      //     ];
+
+      //     resolve(data);
+      //   }, 500);
+    },
+    handleNodeClick(val) {
+      console.log(val);
+      this.$set(this.formBroadcast, "postArea", val.id);
+      this.$set(this.formBroadcast, "postAreaName", val.name);
+      if (!val.children || val.children.length == 0) {
+        this.$refs.selectReport.blur();
+      }
+    },
+    handleClick() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+
+      getItemList({ userId: this.userId, ...this.queryParams }).then(
+        (response) => {
+          this.typeList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("formBroadcast");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    addNew() {
+      this.getAreaList();
+      this.openAllocation = true;
+      this.edit = false;
+      this.ids = null;
+      this.confirmLoading = false;
+      this.formBroadcast = {};
+      setTimeout(() => {
+        this.$refs.formBroadcast.clearValidate();
+      }, 0);
+    },
+    /** 编辑地址 新增达人*/
+    handleAddbroadcast(item) {
+      this.getAreaList();
+      this.$nextTick(() => {
+        this.ids = item.itemId;
+        this.edit = true;
+        this.openAllocation = true;
+        this.$set(this.formBroadcast, "activityId", item.activityId);
+        this.$set(this.formBroadcast, "itemId", item.itemId);
+        this.$set(this.formBroadcast, "postArea", item.postArea);
+        this.$set(this.formBroadcast, "noPostArea", item.noPostArea);
+        this.$set(this.formBroadcast, "commissionRate", item.commissionRate);
+
+        this.$set(
+          this.formBroadcast,
+          "regimentalPromotion",
+          item.regimentalPromotion
+        );
+        this.$set(
+          this.formBroadcast,
+          "regimentalPromotionRate",
+          item.regimentalPromotionRate
+        );
+        this.$set(
+          this.formBroadcast,
+          "sampleRequirement",
+          item.sampleRequirement
+        );
+        this.$set(this.formBroadcast, "sampleCount", item.sampleCount);
+        this.$set(this.formBroadcast, "detailUrl", item.detailUrl);
+        this.$set(this.formBroadcast, "deliveryRate", item.deliveryRate);
+        this.$set(
+          this.formBroadcast,
+          "partnerRecommendText",
+          item.partnerRecommendText
+        );
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+    },
+    /** 新增直播确定按钮 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          if (!this.edit) {
+            localStorage.setItem(
+              "addItemInfo",
+              JSON.stringify(this.formBroadcast)
+            );
+            this.$router.replace({
+              path: "/goodsManagement/goodsPreview",
+            });
+          } else {
+            this.confirmLoading = true;
+            var params = { ...this.formBroadcast };
+            params.examineStatus = 1;
+            editItem(params)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.openAllocation = false;
+                this.formBroadcast = {};
+                this.getList();
+                this.$modal.msgSuccess("修改成功");
+              })
+              .catch(() => {
+                this.confirmLoading = false;
+                this.$message.error("失败");
+              });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          var fileList = this.$refs.fileUploadDialog.fileList;
+          var dapanUrls = this.$refs.fileUpload.fileList;
+          var portraitUrls = this.$refs.fileUploadFx.fileList;
+          if (
+            fileList.length == 0 &&
+            dapanUrls.length == 0 &&
+            portraitUrls.length == 0
+          ) {
+            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
+            return;
+          } else {
+            this.confirmLoading = true;
+            let formData = new FormData();
+            this.ids;
+            formData.append("id", this.ids);
+            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
+            formData.append(
+              "dapanUrls",
+              JSON.stringify(
+                dapanUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            formData.append(
+              "portraitUrls",
+              JSON.stringify(
+                portraitUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            fileList.forEach((file) => formData.append("files", file.raw));
+            dataUpload(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("上传成功");
+                this.open = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+          console.log(fileList, dapanUrls, portraitUrls);
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+</style>
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-tabs__content {
+  overflow: initial;
+}
+</style>

+ 650 - 0
src/views/goodsManagement/promoterSelect.vue

@@ -0,0 +1,650 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          placeholder="请输入达人名称"
+          style="width: 240px"
+          v-model="queryParams.promoterNickName"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="达人ID" prop="promoterId">
+        <el-input
+          placeholder="请输入达人ID"
+          style="width: 240px"
+          v-model="queryParams.promoterId"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="toIndexDetail"
+          >设置领样数量
+        </el-button>
+      </el-col>
+    </el-row>
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      ref="multipleTable"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column
+        label="达人名称"
+        align="center"
+        prop="promoterNickName"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.promoterUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.promoterNickName"
+              >
+                {{ scope.row.promoterNickName }}
+              </a>
+              <p>达人Id: {{ scope.row.promoterId }}</p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="粉丝数" align="center" prop="fansNumber"> </el-table-column>
+      <el-table-column label="总销售额" align="center" prop="totalSale">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.totalSale">
+            {{ scope.row.totalSale }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="所属渠道" align="center" prop="userName">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.userName">
+            {{ scope.row.userName }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="佣金要求" align="center" prop="commissionRequirement">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.commissionRequirement">
+            {{ scope.row.commissionRequirement }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="200px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAddbroadcast(scope.row)"
+            >修改地址</el-button
+          >
+          <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
+            >复制</el-button
+          >
+        </template>
+      </el-table-column> -->
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加直播 -->
+    <el-dialog
+      :title="!!ids ? '修改地址' : '新增达人'"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <div v-if="!ids">
+          <el-form-item label="创建人" prop="userName" style="width: 100%">
+            {{ $store.getters.name }}
+          </el-form-item>
+          <el-form-item
+            label="快手ID"
+            prop="promoterId"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入快手ID"
+              style="width: 240px"
+              v-model="formBroadcast.promoterId"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="佣金要求"
+            prop="commissionRequirement"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入佣金要求"
+              style="width: 240px"
+              v-model="formBroadcast.commissionRequirement"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="品类要求"
+            prop="categoryRequirement"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入品类要求"
+              style="width: 240px"
+              v-model="formBroadcast.categoryRequirement"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="收货人"
+            prop="consignee"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入收货人"
+              style="width: 240px"
+              v-model="formBroadcast.consignee"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="联系方式"
+            prop="phone"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入联系方式"
+              style="width: 240px"
+              v-model="formBroadcast.phone"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="发货地址"
+            prop="promoterAddress"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入发货地址"
+              style="width: 100%"
+              type="textarea"
+              :rows="2"
+              v-model="formBroadcast.promoterAddress"
+            >
+            </el-input>
+          </el-form-item>
+        </div>
+        <div v-else>
+          <el-form-item label="达人名称" prop="promoterNickName" style="width: 100%">
+            {{ formBroadcast.promoterNickName }}({{ formBroadcast.promoterId }})
+          </el-form-item>
+          <el-form-item
+            label="收货人"
+            prop="consignee"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入收货人"
+              style="width: 240px"
+              v-model="formBroadcast.consignee"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="联系方式"
+            prop="phone"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入联系方式"
+              style="width: 240px"
+              v-model="formBroadcast.phone"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="发货地址"
+            prop="promoterAddress"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入发货地址"
+              style="width: 100%"
+              type="textarea"
+              :rows="2"
+              v-model="formBroadcast.promoterAddress"
+            >
+            </el-input>
+          </el-form-item>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import { getPromoterList, addPromoter, editPromoter } from "@/api/promoter/promoter";
+export default {
+  name: "account-list",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      okIds: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        promoterNickName: undefined,
+        promoterId: undefined,
+      },
+      //页面所有的下拉数据
+      queryParamsList: {},
+      // 表单参数
+      form: {},
+      formBroadcast: {},
+      //上传报表下拉数据
+      formList: {},
+      fileList: [],
+      accept: "",
+      //获取销售线索文件流
+      dateFile: new FormData(),
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {},
+      rulesBroadcast: {
+        promoterId: {
+          required: true,
+          message: "快手ID必填",
+          trigger: "blur",
+        },
+        consignee: {
+          required: true,
+          message: "收货人必填",
+          trigger: "blur",
+        },
+        phone: {
+          required: true,
+          message: "联系方式必填",
+          trigger: "blur",
+        },
+        promoterAddress: [
+          {
+            required: true,
+            message: "发货地址必填",
+            trigger: "blur",
+          },
+          {
+            min: 5,
+            max: 200,
+            message: "发货地址最少输入5个字符",
+            trigger: "change",
+          },
+        ],
+      },
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+  },
+  filters: {},
+  methods: {
+    handleSelectionChange(selection) {
+      this.okIds = selection.map((item) => item.promoterId);
+    },
+    toIndexDetail(item) {
+      var that = this;
+      if (!!this.okIds) {
+        this.$router.replace({
+          path: "/goodsManagement/set",
+          query: {
+            promoterIds: JSON.stringify(this.okIds),
+            itemIds: that.$route.query.itemIds,
+          },
+        });
+      } else {
+        this.$message.error("请选择达人");
+      }
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getPromoterList({ userId: this.userId, ...this.queryParams }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("formBroadcast");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    addNew() {
+      this.openAllocation = true;
+      this.edit = false;
+      this.ids = null;
+      this.confirmLoading = false;
+      this.formBroadcast = {};
+      setTimeout(() => {
+        this.$refs.formBroadcast.clearValidate();
+      }, 0);
+    },
+    /** 编辑地址 新增达人*/
+    handleAddbroadcast(item) {
+      this.ids = item.id;
+      this.edit = true;
+      this.openAllocation = true;
+      this.$set(this.formBroadcast, "consignee", item.consignee);
+      this.$set(this.formBroadcast, "phone", item.phone);
+      this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
+      this.$set(this.formBroadcast, "promoterNickName", item.promoterNickName);
+      this.$set(this.formBroadcast, "promoterId", item.promoterId);
+    },
+    copyInfomation(item) {
+      if (navigator.clipboard && window.isSecureContext) {
+        navigator.clipboard
+          .writeText(
+            `
+收货人: ${item.consignee}
+手机号: ${item.phone}
+收货地址: ${item.promoterAddress}`
+          )
+          .then(() => {
+            this.$message.success("复制成功");
+          })
+          .catch((err) => {
+            this.$message.error("复制失败");
+          });
+      } else {
+        // 创建text area
+        const textArea = document.createElement("textarea");
+        textArea.value = `
+收货人: ${item.consignee}
+手机号: ${item.phone}
+收货地址: ${item.promoterAddress}`;
+        // 使text area不在viewport,同时设置不可见
+        document.body.appendChild(textArea);
+        textArea.focus();
+        textArea.select();
+        return new Promise((resolve, reject) => {
+          // 执行复制命令并移除文本框
+          document.execCommand("copy") ? resolve() : reject(new Error("出错了"));
+          textArea.remove();
+        }).then(
+          () => {
+            this.$message.success("复制成功");
+          },
+          () => {
+            this.$message.error("复制失败");
+          }
+        );
+      }
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+    },
+    /** 新增直播确定按钮 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          this.confirmLoading = true;
+          let formData = {
+            userId: this.userId,
+            userName: this.$store.getters.name,
+            ...this.formBroadcast,
+          };
+
+          if (!this.ids) {
+            addPromoter(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("新增成功");
+                this.openAllocation = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          } else {
+            formData.id = this.ids;
+            editPromoter(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("修改成功");
+                this.openAllocation = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          var fileList = this.$refs.fileUploadDialog.fileList;
+          var dapanUrls = this.$refs.fileUpload.fileList;
+          var portraitUrls = this.$refs.fileUploadFx.fileList;
+          if (fileList.length == 0 && dapanUrls.length == 0 && portraitUrls.length == 0) {
+            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
+            return;
+          } else {
+            this.confirmLoading = true;
+            let formData = new FormData();
+            formData.append("id", this.ids);
+            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
+            formData.append(
+              "dapanUrls",
+              JSON.stringify(
+                dapanUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            formData.append(
+              "portraitUrls",
+              JSON.stringify(
+                portraitUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            fileList.forEach((file) => formData.append("files", file.raw));
+            dataUpload(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("上传成功");
+                this.open = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+          console.log(fileList, dapanUrls, portraitUrls);
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+}
+
+::v-deep .entire-line .el-form-item__content {
+  width: 60%;
+}
+
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+</style>
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+
+.tableBox {
+  width: 100%;
+}
+
+::v-deep .el-table {
+  height: calc(100vh - 280px);
+}
+</style>

+ 748 - 0
src/views/goodsManagement/samplingDetail.vue

@@ -0,0 +1,748 @@
+<template>
+  <div class="app-container">
+    <el-card shadow="never" class="card-show" v-if="itemJson" style="margin-bottom: 24px">
+      <div>
+        <h3 style="font-weight: blod">
+          {{ itemJson.itemTitle }}({{ itemJson.itemId }})
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            @click="okInfomation"
+            style="float: right"
+            :loading="loading"
+            v-if="itemJson.collectSampleStatus == 1"
+            :disabled="
+              $store.getters.roles[0] != 'admin' &&
+              $store.getters.roles[0] != 'supplyChainAdmin' &&
+              $store.getters.roles[0] != 'courtship' &&
+              $store.getters.roles[0] != 'courtshipManager'
+            "
+            >通过</el-button
+          >
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            @click="
+              refuseVisible = true;
+              refuseInfo = null;
+            "
+            style="float: right; margin: 0 10px"
+            v-if="itemJson.collectSampleStatus == 1"
+            :disabled="
+              $store.getters.roles[0] != 'admin' &&
+              $store.getters.roles[0] != 'supplyChainAdmin' &&
+              $store.getters.roles[0] != 'courtship' &&
+              $store.getters.roles[0] != 'courtshipManager'
+            "
+            >拒绝</el-button
+          >
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            @click="handleAddbroadcast"
+            style="float: right; margin: 0 10px"
+            v-if="itemJson.collectSampleStatus == 3"
+            :disabled="
+              $store.getters.roles[0] != 'admin' &&
+              $store.getters.roles[0] != 'supplyChainAdmin' &&
+              $store.getters.roles[0] != 'courtship' &&
+              $store.getters.roles[0] != 'courtshipManager'
+            "
+            >录入单号</el-button
+          >
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            style="float: right"
+            @click="
+              workVisible = true;
+              noticeContent = '';
+            "
+            v-if="itemJson.collectSampleStatus == 5"
+            :disabled="
+              $store.getters.roles[0] != 'admin' &&
+              $store.getters.roles[0] != 'supplyChainAdmin' &&
+              $store.getters.roles[0] != 'bdManager' &&
+              $store.getters.roles[0] != 'bd' &&
+              $store.getters.roles[0] != 'association' &&
+              $store.getters.roles[0] != 'associationManager'
+            "
+            >上传作业</el-button
+          >
+          <el-button
+            type="primary"
+            icon="el-icon-document-add"
+            size="mini"
+            style="float: right"
+            @click="workLookVisible = true"
+            v-if="itemJson.collectSampleStatus == 6"
+            >查看作业</el-button
+          >
+        </h3>
+        <div style="display: flex; justify-content: space-between">
+          <el-descriptions title="" style="width: 80%">
+            <el-descriptions-item label="创建人">{{
+              itemJson.itemCreateName
+            }}</el-descriptions-item>
+            <el-descriptions-item label="商品ID" :span="2">{{
+              itemJson.itemId
+            }}</el-descriptions-item>
+            <el-descriptions-item label="创建时间">{{
+              itemJson.createTime
+            }}</el-descriptions-item>
+            <el-descriptions-item label="备注" :span="2">
+              {{ itemJson.collectSampleDesc }}
+            </el-descriptions-item>
+          </el-descriptions>
+          <div style="width: 150px">
+            <p>状态</p>
+            <p style="font-weight: bold">
+              {{ itemJson.collectSampleStatus | collectSampleStatusName }}
+            </p>
+          </div>
+        </div>
+      </div>
+    </el-card>
+    <el-row :gutter="24" v-if="itemJson">
+      <el-col :span="24" v-if="itemJson">
+        <el-card shadow="never" class="card-show">
+          <el-card shadow="never" class="card-show">
+            <h4><span class="prefix"></span>流程进度</h4>
+            <el-steps :active="itemLogs.length - 1" align-center>
+              <el-step title="创建领取">
+                <div slot="description">
+                  {{ itemJson.itemCreateName }}
+                  <br />
+                  {{ itemJson.createTime }}
+                </div>
+              </el-step>
+              <el-step
+                :title="`招商审核${
+                  itemLogs[1]
+                    ? itemLogs[1].collectSampleStatus == 3
+                      ? '通过'
+                      : '拒绝'
+                    : ''
+                }`"
+              >
+                <div slot="description">
+                  {{ itemLogs[1] ? itemLogs[1].userName : "" }}
+                  <br />
+                  {{ itemLogs[1] ? itemLogs[1].updateTime : "" }}
+                </div></el-step
+              >
+              <el-step title="快递录入">
+                <div slot="description">
+                  {{ itemLogs[2] ? itemLogs[2].userName : "" }}
+                  <br />
+                  {{ itemLogs[2] ? itemLogs[2].createTime : "" }}
+                </div></el-step
+              >
+              <el-step title="作业上传">
+                <div slot="description">
+                  {{ itemLogs[3] ? itemLogs[3].userName : "" }}
+                  <br />
+                  {{ itemLogs[3] ? itemLogs[3].createTime : "" }}
+                </div></el-step
+              >
+              <el-step title="完成">
+                <div slot="description">
+                  {{ itemLogs[4] ? itemLogs[4].userName : "" }}
+                  <br />
+                  {{ itemLogs[4] ? itemLogs[4].createTime : "" }}
+                </div></el-step
+              >
+            </el-steps>
+          </el-card>
+          <el-card shadow="never" class="card-show main-top">
+            <h4><span class="prefix"></span>用户信息</h4>
+            <div style="width: 100%" class="item-name-calss dh-data">
+              <p>用户名称:{{ itemJson.promoterNickName }}</p>
+              <p>联系电话:{{ itemJson.promoterPhone }}</p>
+              <p>联系地址:{{ itemJson.promoterAddress }}</p>
+            </div>
+          </el-card>
+          <el-card shadow="never" class="card-show main-top" v-if="itemInfo">
+            <h4><span class="prefix"></span>物流信息</h4>
+            <div style="width: 100%; margin-bottom: 15px" class="item-name-calss dh-data">
+              <p>快递单号:{{ itemInfo.courierNumber }}</p>
+            </div>
+            <div
+              style="width: 100%"
+              class="item-name-calss dh-data"
+              v-if="!!itemInfo.expressData && itemInfo.expressData.length > 0"
+            >
+              <timeline :reverse="false">
+                <timeline-item
+                  v-for="(activity, index) in itemInfo.expressData"
+                  :key="index"
+                  :timestamp="activity.ftime"
+                >
+                  {{ activity.context }}
+                </timeline-item>
+              </timeline>
+            </div>
+            <div v-else>
+              <el-empty description="暂无数据"></el-empty>
+            </div>
+          </el-card>
+        </el-card>
+      </el-col>
+    </el-row>
+    <el-dialog
+      title="拒绝原因"
+      :visible.sync="refuseVisible"
+      width="500px"
+      append-to-body
+    >
+      <el-input
+        placeholder="请输入拒绝原因"
+        style="width: 100%"
+        type="textarea"
+        :rows="2"
+        v-model="refuseInfo"
+      >
+      </el-input>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitRefuse" :loading="refuseLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            refuseLoading = false;
+            refuseVisible = false;
+            refuseInfo = null;
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <el-dialog
+      title="录入订单"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item label="选择快递公司" prop="companyCode">
+          <el-select v-model="formBroadcast.companyCode" placeholder="请选择">
+            <el-option
+              v-for="item in superiorList"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递单号" prop="courierNumber">
+          <el-input
+            placeholder="请输入快递单号"
+            style="width: 240px"
+            v-model="formBroadcast.courierNumber"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+    <!-- 上传作业 -->
+    <el-dialog title="上传作业" :visible.sync="workVisible" width="500px" append-to-body>
+      <uploadEditor
+        v-model="noticeContent"
+        style="min-height: 100px"
+        v-if="workVisible"
+      />
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="workUpload" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            workVisible = false;
+            noticeContent = '';
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+    <!-- 查看作业 -->
+    <el-dialog
+      title="查看作业"
+      :visible.sync="workLookVisible"
+      width="500px"
+      append-to-body
+      center
+    >
+      <div v-if="itemJson.taskFileUrl">
+        <div v-html="itemJson.taskFileUrl"></div>
+      </div>
+      <el-dialog
+        width="30%"
+        title="拒绝原因"
+        :visible.sync="innerVisible"
+        append-to-body
+        center
+      >
+        <el-input
+          placeholder="请输入拒绝原因"
+          style="width: 100%"
+          type="textarea"
+          :rows="2"
+          v-model="refuseInfo"
+        >
+        </el-input>
+        <div
+          slot="footer"
+          class="dialog-footer"
+          v-if="
+            $store.getters.roles[0] == 'admin' ||
+            $store.getters.roles[0] == 'supplyChainAdmin' ||
+            $store.getters.roles[0] == 'courtship' ||
+            $store.getters.roles[0] == 'courtshipManager'
+          "
+        >
+          <el-button type="primary" @click="workReject" :loading="confirmLoading"
+            >确 定</el-button
+          >
+          <el-button
+            @click="
+              innerVisible = false;
+              refuseInfo = null;
+            "
+            >取 消</el-button
+          >
+        </div>
+      </el-dialog>
+      <div
+        slot="footer"
+        class="dialog-footer"
+        v-if="
+          $store.getters.roles[0] == 'admin' ||
+          $store.getters.roles[0] == 'supplyChainAdmin' ||
+          $store.getters.roles[0] == 'courtship' ||
+          $store.getters.roles[0] == 'courtshipManager'
+        "
+      >
+        <el-button type="primary" @click="workLookUpload" :loading="loading"
+          >通 过</el-button
+        >
+        <el-button
+          @click="
+            innerVisible = true;
+            refuseInfo = null;
+          "
+          >拒 绝</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getItemPreview,
+  insertItem,
+  getDetail,
+  editPreview,
+  getCompany,
+} from "@/api/goodsManagement/goods";
+
+import Timeline from "./timeline/index.js";
+import TimelineItem from "./timeline-item/index.js";
+
+import uploadEditor from "./uploadEditor.vue";
+export default {
+  name: "goods-preview",
+  components: {
+    Timeline,
+    TimelineItem,
+    uploadEditor,
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 选中数组
+      ids: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      formBroadcast: {},
+      rulesBroadcast: {
+        companyCode: {
+          required: true,
+          message: "快递公司必选",
+          trigger: "change",
+        },
+        courierNumber: {
+          required: true,
+          message: "快递单号必填",
+          trigger: "blur",
+        },
+      },
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoading: false,
+      // 日期范围
+      dateRange: [],
+      superiorList: [],
+      // 查询参数
+      timer: null,
+      theSpeed: this.speed,
+      imgWidth: 260,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemTitle: undefined,
+        itemId: undefined,
+        examineStatus: "2",
+      },
+      judgeStatus: 1,
+      itemInfo: null,
+      itemJson: null,
+      itemLogs: null,
+      refuseInfo: null,
+      refuseVisible: false,
+      refuseLoading: false,
+      superiorList: [],
+      workVisible: false,
+      noticeContent: "",
+      workLookVisible: false,
+      innerVisible: false,
+    };
+  },
+  created() {
+    console.log(this.itemInfo);
+  },
+  mounted() {
+    this.getItemPreview();
+    this.$nextTick(() => {});
+  },
+  filters: {
+    collectSampleStatusName(value) {
+      let name = {
+        1: "待审核",
+        2: "领样申请审核拒绝",
+        3: "待录入订单号",
+        4: "已发货",
+        5: "已签收待上传作业",
+        6: "待招商审核",
+        7: "审核通过",
+      };
+      return name[value];
+    },
+  },
+  watch: {},
+  methods: {
+    getItemPreview() {
+      getDetail({
+        id: this.$route.query.id,
+        userId: this.$store.getters.userId,
+      }).then((res) => {
+        this.itemJson = res.sample;
+        this.itemInfo = res.express
+          ? {
+              ...res.express,
+              expressData: JSON.parse(res.express.expressData),
+            }
+          : null;
+        this.itemLogs = res.logs;
+      });
+    },
+    workLookUpload() {
+      var params = {};
+      params.id = this.$route.query.id;
+      params.collectSampleStatus = 7;
+      params.userId = this.$store.getters.userId;
+      params.userName = this.$store.getters.name;
+      editPreview(params)
+        .then((res) => {
+          this.getList();
+          this.$modal.msgSuccess("审核通过");
+        })
+        .catch(() => {
+          this.$message.error("失败");
+        });
+    },
+    workReject() {
+      this.confirmLoading = true;
+      if (!!this.refuseInfo) {
+        var params = {};
+        params.id = this.$route.query.id;
+        params.collectSampleStatus = 5;
+        params.collectSampleDesc = this.refuseInfo;
+        params.userId = this.$store.getters.userId;
+        params.userName = this.$store.getters.name;
+        editPreview(params)
+          .then((res) => {
+            this.confirmLoading = false;
+            this.innerVisible = false;
+            this.refuseInfo = null;
+            this.workLookVisible = false;
+            this.showWork = null;
+            this.getItemPreview();
+            this.$modal.msgSuccess("已拒绝");
+          })
+          .catch(() => {
+            this.confirmLoading = false;
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请填写拒绝理由");
+      }
+    },
+    workUpload() {
+      this.confirmLoading = true;
+      if (!!this.noticeContent) {
+        var params = {};
+        params.id = this.$route.query.id;
+        params.taskFileUrl = this.noticeContent;
+        params.userId = this.$store.getters.userId;
+        params.userName = this.$store.getters.name;
+        editPreview(params)
+          .then((res) => {
+            this.confirmLoading = false;
+            this.workVisible = false;
+            this.getItemPreview();
+            this.$modal.msgSuccess("上传成功");
+          })
+          .catch(() => {
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请上传作业");
+      }
+    },
+    handleAddbroadcast(item) {
+      this.$nextTick(() => {
+        this.openAllocation = true;
+        getCompany().then((res) => {
+          this.superiorList = res;
+        });
+      });
+    },
+    /** 录入单号确定 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          this.confirmLoading = true;
+          var params = { ...this.formBroadcast };
+          params.id = this.$route.query.id;
+          params.userId = this.$store.getters.userId;
+          params.userName = this.$store.getters.name;
+          editPreview(params)
+            .then((res) => {
+              this.confirmLoading = false;
+              this.openAllocation = false;
+              this.formBroadcast = {};
+              this.$modal.msgSuccess("录入单号成功");
+              this.getItemPreview();
+            })
+            .catch(() => {
+              this.confirmLoading = false;
+              this.$message.error("失败");
+            });
+        }
+      });
+    },
+    okInfomation() {
+      this.loading = true;
+      this.$modal
+        .confirm(`请确认是否审核通过该领样?`)
+        .then(() => {
+          var params = {};
+          params.id = this.$route.query.id;
+          params.collectSampleStatus = 3;
+          params.userId = this.$store.getters.userId;
+          params.userName = this.$store.getters.name;
+          editPreview(params)
+            .then((res) => {
+              this.$modal.msgSuccess("审核通过");
+              this.loading = false;
+              this.getItemPreview();
+            })
+            .catch(() => {
+              this.$message.error("失败");
+              this.loading = false;
+            });
+        })
+        .catch(() => {});
+    },
+    submitRefuse(item) {
+      this.refuseLoading = true;
+      if (!!this.refuseInfo) {
+        var params = {};
+        params.id = this.$route.query.id;
+        params.collectSampleStatus = 2;
+        params.collectSampleDesc = this.refuseInfo;
+        params.userId = this.$store.getters.userId;
+        params.userName = this.$store.getters.name;
+        editPreview(params)
+          .then((res) => {
+            this.refuseLoading = false;
+            this.refuseVisible = false;
+            this.getList();
+            this.$modal.msgSuccess("已拒绝");
+          })
+          .catch(() => {
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请填写拒绝理由");
+      }
+    },
+    addNew() {
+      this.loading = true;
+      if (this.judgeStatus == 1) {
+        var params = {
+          ...this.itemInfo,
+          ...this.itemJson,
+          userId: this.$store.getters.userId,
+          userName: this.$store.getters.name,
+          itemGalleryUrls: this.itemJson.itemGalleryUrls
+            ? JSON.stringify(this.itemJson.itemGalleryUrls)
+            : null,
+          itemDescUrls: this.itemJson.itemDescUrls
+            ? JSON.stringify(this.itemJson.itemDescUrls)
+            : null,
+          skuList: this.itemJson.skuList ? JSON.stringify(this.itemJson.skuList) : null,
+        };
+      } else if (this.judgeStatus == 2) {
+        var params = {
+          ...this.itemInfo,
+          userId: this.$store.getters.userId,
+          userName: this.$store.getters.name,
+          itemImgUrl: this.itemJson.itemImgUrl,
+          itemTitle: this.itemJson.itemTitle,
+          shopTitle: this.itemJson.sellerNickName,
+          itemPrice: this.itemJson.itemPrice,
+          zkFinalPrice: this.itemJson.itemPrice,
+          skuPrice: this.itemJson.itemPrice,
+          categoryName: this.itemJson.itemCategoryName,
+          activityItemStatus: 5,
+          detailUrl: this.itemJson.detailUrl,
+        };
+      }
+
+      insertItem(params).then((res) => {
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-tabs__content {
+  overflow: initial;
+}
+
+.main-top {
+  margin-top: 24px;
+}
+
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+  line-height: 30px;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+  line-height: 30px;
+}
+.tableBox {
+  width: 100%;
+}
+.prefix {
+  display: inline-block;
+  width: 3px;
+  height: 15px;
+  background: rgb(104, 163, 253);
+  position: relative;
+  top: 2px;
+  margin-right: 5px;
+}
+.dh p {
+  font-size: 14px;
+}
+.dh-data p {
+  font-size: 16px;
+}
+.main-box {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+}
+</style>

ファイルの差分が大きいため隠しています
+ 1116 - 0
src/views/goodsManagement/samplingList.vue


+ 253 - 0
src/views/goodsManagement/selectTree.vue

@@ -0,0 +1,253 @@
+<template>
+  <el-select
+    :title="multiple ? optionData.name : ''"
+    ref="select"
+    :value="value"
+    placeholder="请选择"
+    clearable
+    :disabled="disabled"
+    :filterable="filterable"
+    :filter-method="filterMethod"
+    style="width: 100%"
+    @clear="clear"
+    @visible-change="visibleChange"
+  >
+    <el-option
+      ref="option"
+      class="tree-select__option"
+      :value="optionData.id"
+      :label="optionData.name"
+    >
+      <el-tree
+        ref="tree"
+        class="tree-select__tree"
+        :class="`tree-select__tree--${multiple ? 'checked' : 'radio'}`"
+        :node-key="nodeKey"
+        :data="data"
+        :props="props"
+        :default-expanded-keys="[value]"
+        :show-checkbox="multiple"
+        :highlight-current="!multiple"
+        :expand-on-click-node="multiple"
+        :filter-node-method="filterNode"
+        @node-click="handleNodeClick"
+        @check-change="handleCheckChange"
+        :load="loadNode"
+        lazy
+      ></el-tree>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+import { getItemList, getAreaList, getCity } from "@/api/goodsManagement/goods";
+export default {
+  name: "TreeSelect",
+  props: {
+    // v-model绑定
+    value: {
+      type: [String, Number],
+      default: "",
+    },
+    multiple: {
+      type: Boolean,
+      default: false,
+    },
+    // 树形的数据
+    data: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    // 每个树节点用来作为唯一标识的属性
+    nodeKey: {
+      type: [String, Number],
+      default: "id",
+    },
+    filterable: {
+      type: Boolean,
+      default: false,
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
+    // tree的props配置
+    props: {
+      type: Object,
+      default: function () {
+        return {
+          label: "label",
+          children: "children",
+        };
+      },
+    },
+  },
+  data() {
+    return {
+      optionData: {
+        id: "",
+        name: "",
+      },
+      filterFlag: false,
+    };
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (!this.isEmpty(this.data)) {
+          this.init(val);
+        }
+      },
+      immediate: true,
+    },
+    data: function (val) {
+      if (!this.isEmpty(val)) {
+        this.init(this.value);
+      }
+    },
+  },
+  created() {},
+  methods: {
+    loadNode(node, resolve) {
+      if (node.level === 0) {
+        return resolve([{ name: "region" }]);
+      }
+      if (node.level > 1) return resolve([]);
+
+      console.log(node);
+      getCity({ province: node.data.id }).then((res) => {
+        const data = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+          };
+        });
+        resolve(data);
+      });
+      //   setTimeout(() => {
+      //     const data = [
+      //       {
+      //         name: "leaf",
+      //         leaf: true,
+      //       },
+      //       {
+      //         name: "zone",
+      //       },
+      //     ];
+
+      //     resolve(data);
+      //   }, 500);
+    },
+    // 是否为空
+    isEmpty(val) {
+      for (let key in val) {
+        return false;
+      }
+      return true;
+    },
+    handleNodeClick(data, node, leaf) {
+      console.log(data, node, leaf);
+      if (this.multiple) {
+        return;
+      }
+      if (node.level == 1) {
+        this.$emit("input", data[this.nodeKey]);
+      } else {
+        var pinData = node.parent.data.name + "-" + data[this.nodeKey];
+        this.$emit("input", pinData);
+      }
+
+      this.$refs.select.visible = false;
+    },
+    handleCheckChange() {
+      const nodes = this.$refs.tree.getCheckedNodes();
+      const value = nodes.map((item) => item[this.nodeKey]).join(",");
+      this.$emit("input", value);
+    },
+    init(val) {
+      // 多选
+      if (this.multiple) {
+        const arr = val.toString().split(",");
+        this.$nextTick(() => {
+          this.$refs.tree.setCheckedKeys(arr);
+          const nodes = this.$refs.tree.getCheckedNodes();
+          this.optionData.id = val;
+          this.optionData.name = nodes
+            .map((item) => item[this.props.label])
+            .join(",");
+        });
+      }
+      // 单选
+      else {
+        val = val === "" ? null : val;
+        this.$nextTick(() => {
+          this.$refs.tree.setCurrentKey(val);
+          if (val === null) {
+            return;
+          }
+          const label = this.props.label || "name";
+          var node;
+          if (val.indexOf("-") > -1) {
+            node = this.$refs.tree.getNode(val.split("-")[1]);
+          } else {
+            node = this.$refs.tree.getNode(val);
+          }
+
+          this.optionData.id = val;
+          this.optionData[label] = val;
+        });
+      }
+    },
+    visibleChange(e) {
+      if (e) {
+        const tree = this.$refs.tree;
+        this.filterFlag && tree.filter("");
+        this.filterFlag = false;
+        let selectDom = null;
+        if (this.multiple) {
+          selectDom = tree.$el.querySelector(".el-tree-node.is-checked");
+        } else {
+          selectDom = tree.$el.querySelector(".is-current");
+        }
+        setTimeout(() => {
+          this.$refs.select.scrollToOption({ $el: selectDom });
+        }, 0);
+      }
+    },
+    clear() {
+      this.$emit("input", "");
+    },
+    filterMethod(val) {
+      this.filterFlag = true;
+      this.$refs.tree.filter(val);
+    },
+    filterNode(value, data) {
+      if (!value) return true;
+      const label = this.props.label || "name";
+      return data[label].indexOf(value) !== -1;
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.tree-select__option {
+  &.el-select-dropdown__item {
+    height: auto;
+    line-height: 1;
+    padding: 0;
+    background-color: #fff;
+  }
+}
+
+// .tree-select__tree {
+//   &.tree-select__tree--radio {
+//     .el-tree-node.is-current > .el-tree-node__content {
+//       color: #1890ff;
+//       font-weight: 700;
+//     }
+//   }
+// }
+</style>

+ 822 - 0
src/views/goodsManagement/setSampleCollection.vue

@@ -0,0 +1,822 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="addNew"
+          >提交领样</el-button
+        >
+      </el-col>
+    </el-row>
+    <p>领样已提交数量:{{ sampleReceivedCount }}</p>
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      ref="multipleTable"
+      @selection-change="handleSelectionChange"
+      row-key="itemId"
+    >
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column label="商品名称" align="center" prop="itemId" width="300">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img :src="scope.row.itemImgUrl" alt="" style="width: 70px; height: auto" />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>商品单价: {{ scope.row.itemPrice / 100 }}元</p>
+
+              <p>
+                佣金率:
+                {{ scope.row.commissionRate ? scope.row.commissionRate / 10 + "%" : "-" }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="达人名称"
+        align="center"
+        prop="promoterNickName"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.promoterUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.promoterNickName"
+              >
+                {{ scope.row.promoterNickName }}
+              </a>
+              <p>达人Id: {{ scope.row.promoterId }}</p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="领样数量" align="center" prop="sampleCount">
+        <template slot-scope="scope">
+          <div>
+            <el-input
+              v-model="scope.row.sampleCount"
+              placeholder="请输入领样数量"
+            ></el-input>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="领样规则" align="center" prop="sampleRequirement">
+        <template slot-scope="scope">
+          <div>
+            <el-input
+              v-model="scope.row.sampleRequirement"
+              placeholder="请输入领样规则"
+            ></el-input>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="200px"
+      >
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
+            >一键同步</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加直播 -->
+    <el-dialog
+      :title="!!ids ? '修改商品' : '新增商品'"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item label="创建人" prop="userName" style="width: 100%">
+          {{ $store.getters.name }}
+        </el-form-item>
+        <el-form-item label="活动ID" prop="activityId">
+          <el-input
+            placeholder="请输入活动ID"
+            style="width: 240px"
+            v-model="formBroadcast.activityId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品ID" prop="itemId">
+          <el-input
+            placeholder="请输入商品ID"
+            style="width: 240px"
+            v-model="formBroadcast.itemId"
+            :disabled="edit"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货地" prop="postArea">
+          <selectTree
+            :disabled="edit"
+            style="width: 240px"
+            v-model="formBroadcast.postArea"
+            filterable
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="不发货地区" prop="noPostArea">
+          <selectTree
+            style="width: 240px"
+            v-model="formBroadcast.noPostArea"
+            filterable
+            :multiple="true"
+            :data="superiorList"
+            :props="{
+              value: 'id',
+              label: 'name',
+            }"
+          />
+        </el-form-item>
+        <el-form-item label="佣金比例" prop="commissionRate">
+          <el-input
+            placeholder="请输入佣金比例"
+            style="width: 240px"
+            v-model="formBroadcast.commissionRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费" prop="regimentalPromotion">
+          <el-input
+            placeholder="请输入服务费"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotion"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="服务费率" prop="regimentalPromotionRate">
+          <el-input
+            placeholder="请输入服务费率"
+            style="width: 240px"
+            v-model="formBroadcast.regimentalPromotionRate"
+          >
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="领样要求" prop="sampleRequirement">
+          <el-input
+            placeholder="请输入领样要求"
+            style="width: 240px"
+            v-model="formBroadcast.sampleRequirement"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="样品数量" prop="sampleCount">
+          <el-input
+            placeholder="请输入样品数量"
+            style="width: 240px"
+            v-model="formBroadcast.sampleCount"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="商品链接" prop="detailUrl">
+          <el-input
+            placeholder="请输入商品链接"
+            style="width: 240px"
+            v-model="formBroadcast.detailUrl"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="发货率" prop="deliveryRate">
+          <el-input
+            placeholder="请输入发货率"
+            style="width: 240px"
+            v-model="formBroadcast.deliveryRate"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item
+          label="手卡内容"
+          prop="partnerRecommendText"
+          style="width: 100%"
+          class="entire-line"
+        >
+          <el-input
+            placeholder="请输入手卡内容"
+            style="width: 100%"
+            type="textarea"
+            :rows="2"
+            v-model="formBroadcast.partnerRecommendText"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <!-- 审核拒绝 -->
+    <el-dialog
+      title="拒绝原因"
+      :visible.sync="refuseVisible"
+      width="500px"
+      append-to-body
+    >
+      <el-input
+        placeholder="请输入拒绝原因"
+        style="width: 100%"
+        type="textarea"
+        :rows="2"
+        v-model="refuseInfo"
+      >
+      </el-input>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitRefuse" :loading="refuseLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            refuseLoading = false;
+            refuseVisible = false;
+            refuseInfo = null;
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import {
+  getItemList,
+  getAreaList,
+  getCity,
+  checkItem,
+  editItem,
+  preview,
+  addPreview,
+} from "@/api/goodsManagement/goods";
+import selectTree from "./selectTree.vue";
+export default {
+  name: "account-list",
+  components: {
+    selectTree,
+  },
+  data() {
+    const equalToPassword = (rule, value, callback) => {
+      if (!!value && !this.edit) {
+        checkItem({ itemId: value }).then((res) => {
+          if (res.message == "true") {
+            callback();
+          } else {
+            callback(new Error(res.message));
+          }
+        });
+      } else {
+        callback();
+      }
+    };
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      okIds: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      sampleReceivedCount: 0,
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      superiorList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemTitle: undefined,
+        itemId: undefined,
+        examineStatus: "2",
+      },
+      //页面所有的下拉数据
+      queryParamsList: {
+        tagList: [
+          { value: "2", label: "我的商品" },
+          { value: "1", label: "待审核" },
+          { value: "3", label: "审核拒绝" },
+        ],
+      },
+      // 表单参数
+      form: {},
+      formBroadcast: {},
+      //上传报表下拉数据
+      formList: {},
+      fileList: [],
+      accept: "",
+      //获取销售线索文件流
+      dateFile: new FormData(),
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {},
+      rulesBroadcast: {
+        itemId: [
+          {
+            required: true,
+            message: "商品ID必填",
+            trigger: "blur",
+          },
+          { required: true, validator: equalToPassword, trigger: "blur" },
+        ],
+        activityId: {
+          required: true,
+          message: "活动ID必填",
+          trigger: "blur",
+        },
+        postArea: {
+          required: true,
+          message: "发货地必选",
+          trigger: "change",
+        },
+        noPostArea: {
+          required: true,
+          message: "不发货地必选",
+          trigger: "change",
+        },
+        commissionRate: {
+          required: true,
+          message: "佣金比例必填",
+          trigger: "blur",
+        },
+        regimentalPromotion: {
+          required: true,
+          message: "服务费必填",
+          trigger: "blur",
+        },
+        regimentalPromotionRate: {
+          required: true,
+          message: "服务费率必填",
+          trigger: "blur",
+        },
+        sampleRequirement: {
+          required: true,
+          message: "领样要求必填",
+          trigger: "blur",
+        },
+        sampleCount: {
+          required: true,
+          message: "样品数量必填",
+          trigger: "blur",
+        },
+        partnerRecommendText: [
+          {
+            required: true,
+            message: "手卡内容必填",
+            trigger: "blur",
+          },
+          {
+            min: 5,
+            max: 200,
+            message: "手卡内容最少输入5个字符",
+            trigger: "change",
+          },
+        ],
+      },
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+      refuseVisible: false,
+      refuseLoading: false,
+      refuseInfo: null,
+      itemId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+  },
+  filters: {
+    activityItemStatusName(status) {
+      const statusMap = {
+        1: "待审核",
+        2: "审核通过",
+        3: "审核失败(拒绝)",
+        5: "失效",
+      };
+      return statusMap[status];
+    },
+  },
+  methods: {
+    handleSelectionChange(selection) {
+      this.okIds = selection.map((item) => item.itemId);
+    },
+    okInfomation(item) {
+      this.$router.replace({
+        path: "/goodsManagement/promoterSelect",
+        query: {
+          itemIds: item.itemId,
+        },
+      });
+    },
+    toDetail(item) {
+      localStorage.setItem("addItemInfo", JSON.stringify({ ...item, type: "look" }));
+      this.$router.replace({
+        path: "/goodsManagement/goodsPreview",
+      });
+    },
+    copyInfomation(item) {
+      if (!!item.sampleRequirement && !!item.sampleCount) {
+        this.typeList = [
+          ...this.typeList.map((items) => {
+            return {
+              ...items,
+              sampleRequirement: item.sampleRequirement,
+              sampleCount: item.sampleCount,
+            };
+          }),
+        ];
+      } else {
+        this.$message.error("请填写完成,方可同步");
+      }
+    },
+    submitRefuse() {
+      if (!!this.refuseInfo) {
+        var params = {};
+        params.itemId = this.itemId;
+        params.examineStatus = 3;
+        params.refuseDetail = this.refuseInfo;
+        params.examineId = this.$store.getters.userId;
+        params.examineName = this.$store.getters.name;
+        editItem(params)
+          .then((res) => {
+            this.refuseVisible = false;
+            this.refuseLoading = false;
+            this.getList();
+            this.$modal.msgSuccess("已拒绝");
+          })
+          .catch(() => {
+            this.$message.error("失败");
+          });
+      } else {
+        this.$message.error("请输入拒绝原因");
+      }
+    },
+    getAreaList() {
+      getAreaList().then((res) => {
+        this.superiorList = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+            disabled: true,
+          };
+        });
+      });
+    },
+    loadNode(node, resolve) {
+      if (node.level === 0) {
+        return resolve([{ name: "region" }]);
+      }
+      if (node.level > 1) return resolve([]);
+
+      console.log(node);
+      getCity({ province: node.data.id }).then((res) => {
+        const data = res.map((item) => {
+          return {
+            id: item,
+            name: item,
+          };
+        });
+        resolve(data);
+      });
+      //   setTimeout(() => {
+      //     const data = [
+      //       {
+      //         name: "leaf",
+      //         leaf: true,
+      //       },
+      //       {
+      //         name: "zone",
+      //       },
+      //     ];
+
+      //     resolve(data);
+      //   }, 500);
+    },
+    handleNodeClick(val) {
+      console.log(val);
+      this.$set(this.formBroadcast, "postArea", val.id);
+      this.$set(this.formBroadcast, "postAreaName", val.name);
+      if (!val.children || val.children.length == 0) {
+        this.$refs.selectReport.blur();
+      }
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+
+      preview({
+        itemIds: this.$route.query.itemIds,
+        promoterIds: this.$route.query.promoterIds,
+        userId: this.$store.getters.userId,
+      }).then((response) => {
+        this.$nextTick(() => {
+          this.okIds = response.preview.samples.map((item) => {
+            return item.itemId;
+          });
+
+          this.typeList = response.preview.samples.map((item) => {
+            return {
+              ...item,
+              sampleCount: null,
+              sampleRequirement: null,
+            };
+          });
+          this.sampleReceivedCount = response.preview.sampleReceivedCount;
+
+          this.$refs.multipleTable.toggleAllSelection();
+        });
+
+        // this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("formBroadcast");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    addNew() {
+      if (this.okIds.length > 0) {
+        var dataArr = [];
+        for (let i = 0; i < this.okIds.length; i++) {
+          for (let c = 0; c < this.typeList.length; c++) {
+            if (this.okIds[i] == this.typeList[c].itemId) {
+              dataArr.push(this.typeList[c]);
+            }
+          }
+        }
+
+        var dataFind = dataArr.findIndex((v) => {
+          return !v.sampleRequirement || !v.sampleCount;
+        });
+        if (dataFind > -1) {
+          this.$message.error("请填写提交的领样");
+        } else {
+          addPreview({ temCollectSamples: JSON.stringify(dataArr) }).then((res) => {});
+        }
+      } else {
+        this.$message.error("请选择提交的领样");
+      }
+      //   this.getAreaList();
+      //   this.openAllocation = true;
+      //   this.edit = false;
+      //   this.ids = null;
+      //   this.confirmLoading = false;
+      //   this.formBroadcast = {};
+      //   setTimeout(() => {
+      //     this.$refs.formBroadcast.clearValidate();
+      //   }, 0);
+    },
+    /** 编辑地址 新增达人*/
+    handleAddbroadcast(item) {
+      this.getAreaList();
+      this.$nextTick(() => {
+        this.ids = item.itemId;
+        this.edit = true;
+        this.openAllocation = true;
+        this.$set(this.formBroadcast, "activityId", item.activityId);
+        this.$set(this.formBroadcast, "itemId", item.itemId);
+        this.$set(this.formBroadcast, "postArea", item.postArea);
+        this.$set(this.formBroadcast, "noPostArea", item.noPostArea);
+        this.$set(this.formBroadcast, "commissionRate", item.commissionRate);
+
+        this.$set(this.formBroadcast, "regimentalPromotion", item.regimentalPromotion);
+        this.$set(
+          this.formBroadcast,
+          "regimentalPromotionRate",
+          item.regimentalPromotionRate
+        );
+        this.$set(this.formBroadcast, "sampleRequirement", item.sampleRequirement);
+        this.$set(this.formBroadcast, "sampleCount", item.sampleCount);
+        this.$set(this.formBroadcast, "detailUrl", item.detailUrl);
+        this.$set(this.formBroadcast, "deliveryRate", item.deliveryRate);
+        this.$set(this.formBroadcast, "partnerRecommendText", item.partnerRecommendText);
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+    },
+    /** 新增直播确定按钮 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          if (!this.edit) {
+            localStorage.setItem("addItemInfo", JSON.stringify(this.formBroadcast));
+            this.$router.replace({
+              path: "/goodsManagement/goodsPreview",
+            });
+          } else {
+            this.confirmLoading = true;
+            var params = { ...this.formBroadcast };
+            params.examineStatus = 1;
+            editItem(params)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.openAllocation = false;
+                this.formBroadcast = {};
+                this.getList();
+                this.$modal.msgSuccess("修改成功");
+              })
+              .catch(() => {
+                this.confirmLoading = false;
+                this.$message.error("失败");
+              });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          var fileList = this.$refs.fileUploadDialog.fileList;
+          var dapanUrls = this.$refs.fileUpload.fileList;
+          var portraitUrls = this.$refs.fileUploadFx.fileList;
+          if (fileList.length == 0 && dapanUrls.length == 0 && portraitUrls.length == 0) {
+            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
+            return;
+          } else {
+            this.confirmLoading = true;
+            let formData = new FormData();
+            this.ids;
+            formData.append("id", this.ids);
+            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
+            formData.append(
+              "dapanUrls",
+              JSON.stringify(
+                dapanUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            formData.append(
+              "portraitUrls",
+              JSON.stringify(
+                portraitUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            fileList.forEach((file) => formData.append("files", file.raw));
+            dataUpload(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("上传成功");
+                this.open = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+          console.log(fileList, dapanUrls, portraitUrls);
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+</style>
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-tabs__content {
+  overflow: initial;
+}
+</style>

+ 8 - 0
src/views/goodsManagement/timeline-item/index.js

@@ -0,0 +1,8 @@
+import ElTimelineItem from '../timeline/src/item'
+
+/* istanbul ignore next */
+ElTimelineItem.install = function(Vue) {
+  Vue.component(ElTimelineItem.name, ElTimelineItem)
+}
+
+export default ElTimelineItem

ファイルの差分が大きいため隠しています
+ 1 - 0
src/views/goodsManagement/timeline-item/timeline-item.css


+ 8 - 0
src/views/goodsManagement/timeline/index.js

@@ -0,0 +1,8 @@
+import Timeline from './src/main'
+
+/* istanbul ignore next */
+Timeline.install = function(Vue) {
+  Vue.component(Timeline.name, Timeline)
+}
+
+export default Timeline

+ 73 - 0
src/views/goodsManagement/timeline/src/item.vue

@@ -0,0 +1,73 @@
+<template>
+  <li class="el-timeline-item">
+    <div class="el-timeline-item__tail"></div>
+
+    <div v-if="!$slots.dot"
+      class="el-timeline-item__node"
+      :class="[
+        `el-timeline-item__node--${size || ''}`,
+        `el-timeline-item__node--${type || ''}`
+      ]"
+      :style="{
+        backgroundColor: color
+      }"
+    >
+      <i v-if="icon"
+        class="el-timeline-item__icon"
+        :class="icon"
+      ></i>
+    </div>
+    <div v-if="$slots.dot" class="el-timeline-item__dot">
+      <slot name="dot"></slot>
+    </div>
+
+    <div class="el-timeline-item__wrapper">
+      <div v-if="!hideTimestamp && placement === 'top'"
+        class="el-timeline-item__timestamp is-top">
+        {{timestamp}}
+      </div>
+
+      <div class="el-timeline-item__content">
+        <slot></slot>
+      </div>
+
+      <div v-if="!hideTimestamp && placement === 'bottom'"
+        class="el-timeline-item__timestamp is-bottom">
+        {{timestamp}}
+      </div>
+    </div>
+  </li>
+</template>
+
+<script>
+export default {
+  name: 'ElTimelineItem',
+
+  inject: ['timeline'],
+
+  props: {
+    timestamp: String,
+
+    hideTimestamp: {
+      type: Boolean,
+      default: false
+    },
+
+    placement: {
+      type: String,
+      default: 'bottom'
+    },
+
+    type: String,
+
+    color: String,
+
+    size: {
+      type: String,
+      default: 'normal'
+    },
+
+    icon: String
+  }
+}
+</script>

+ 38 - 0
src/views/goodsManagement/timeline/src/main.vue

@@ -0,0 +1,38 @@
+<template>
+  <ul class="el-timeline"
+    :class="{
+      'is-reverse': reverse
+    }">
+    <slot></slot>
+  </ul>
+</template>
+
+<script>
+export default {
+  name: 'ElTimeline',
+
+  props: {
+    reverse: {
+      type: Boolean,
+      default: false
+    }
+  },
+
+  provide() {
+    return {
+      timeline: this
+    }
+  },
+
+  watch: {
+    reverse: {
+      handler(newVal) {
+        if (newVal) {
+          this.$slots.default = [...this.$slots.default].reverse()
+        }
+      },
+      immediate: true
+    }
+  }
+}
+</script>

+ 1 - 0
src/views/goodsManagement/timeline/timeline.css

@@ -0,0 +1 @@
+.el-timeline{margin:0;font-size:14px;list-style:none}.el-timeline .el-timeline-item:last-child .el-timeline-item__tail{display:none}

+ 195 - 0
src/views/goodsManagement/uploadEditor.vue

@@ -0,0 +1,195 @@
+<template>
+    <div class="tinymce-editor">
+        <editors v-model="myValue" :init="init" :disabled="disabled" @onClick="onClick" @onChange="onChange"> </editors>
+    </div>
+</template>
+
+<script>
+
+import Editors from '@tinymce/tinymce-vue'
+import tinymce from 'tinymce/tinymce'
+import 'tinymce/themes/silver/theme'
+import 'tinymce/plugins/image'
+import 'tinymce/plugins/link'
+import 'tinymce/plugins/media'
+import 'tinymce/plugins/table'
+import 'tinymce/plugins/lists'
+import 'tinymce/plugins/contextmenu'
+import 'tinymce/plugins/wordcount'
+import 'tinymce/plugins/colorpicker'
+import 'tinymce/plugins/textcolor'
+import 'tinymce/plugins/fullscreen'
+var COS = require('cos-js-sdk-v5')
+var cos = new COS({
+    SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
+    SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9',
+})
+export default {
+    components: {
+        Editors,
+    },
+    props: {
+        value: {
+            type: String,
+            required: false,
+        },
+        triggerChange: {
+            type: Boolean,
+            default: false,
+            required: false,
+        },
+        disabled: {
+            type: Boolean,
+            default: false,
+        },
+        plugins: {
+            type: [String, Array],
+            default: 'paste lists image link media table textcolor wordcount contextmenu fullscreen',
+        },
+        toolbar: {
+            type: [String, Array],
+            default: '',
+            branding: false,
+        },
+    },
+    data() {
+        return {
+            //初始化配置
+            init: {
+                selector: '#tinydemo',
+                language_url: '/tinymce/langs/zh_CN.js',
+                language: 'zh_CN',
+                skin_url: '/tinymce/skins/lightgray',
+                height: 300,
+                plugins: ['paste'],
+                toolbar: this.toolbar,
+                branding: true,
+                menubar: false,
+                toolbar_drawer: true,
+                paste_data_images: true,
+                images_upload_credentials: true,
+                //  解决截图,不走图片上传问题
+                urlconverter_callback: (url, node, onSave, name) => {
+                    if (node === 'img' && url.startsWith('blob:')) {
+                        // Do some custom URL conversion
+                        // console.log('urlConverter:', url, node, onSave, name)
+                        tinymce.activeEditor && tinymce.activeEditor.uploadImages()
+                    }
+                    // Return new URL
+                    return url
+                },
+                images_upload_handler: (blobInfo, success) => {
+                    this.cosUpload(blobInfo, success)
+                    // let formData = new FormData()
+                    // formData.append('file', blobInfo.blob(), blobInfo.filename())
+                    // formData.append('biz', 'jeditor')
+                    // formData.append('jeditor', '1')
+
+                    // uploadAction(window._CONFIG['domianURL'] + '/sys/common/upload', formData).then((res) => {
+                    //     console.log(res)
+                    //     if (res.success) {
+                    //         if (res.message == 'local') {
+                    //             const img = 'data:image/jpeg;base64,' + blobInfo.base64()
+                    //             success(img)
+                    //         } else {
+                    //             let img = getFileAccessHttpUrl(res.message)
+                    //             success(img)
+                    //         }
+                    //     }
+                    // })
+                },
+            },
+            myValue: this.value,
+        }
+    },
+    mounted() {
+        tinymce.init(this.init)
+    },
+    methods: {
+        onClick(e) {
+            this.$emit('onClick', e, tinymce)
+        },
+        //可以添加一些自己的自定义事件,如清空内容
+        clear() {
+            this.myValue = ''
+        },
+        onChange(e) {},
+
+        cosUpload(blobInfo, success) {
+            console.log(success)
+            this.$nextTick(() => {
+                var that = this
+                let date = new Date()
+                let y = date.getFullYear()
+                let MM = date.getMonth() + 1
+                MM = MM < 10 ? '0' + MM : MM
+                let d = date.getDate()
+                d = d < 10 ? '0' + d : d
+                var timeElse = new Date().getTime()
+                var arr = blobInfo.filename().split('.')
+
+                var str = ''
+                for (let i = 0; i < arr.length; i++) {
+                    if (i == arr.length - 1) {
+                    } else {
+                        if (i == arr.length - 2) {
+                            str += arr[i]
+                        } else {
+                            str += arr[i] + '.'
+                        }
+                    }
+                }
+                // console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
+                cos.putObject(
+                    {
+                        Bucket: 'media-1301855440',
+                        /* 必须 */
+                        Region: 'ap-chongqing',
+                        /* 存储桶所在地域,必须字段 */
+                        Key: 'video/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.jpg',
+                        /* 必须 */
+                        StorageClass: 'STANDARD',
+                        Body: blobInfo.blob(), // 上传文件对象
+                        onProgress: function (progressData) {
+                            //进度条方法
+                        },
+                        onTaskReady: function (tid) {
+                            // console.log('onTaskReady', tid);
+                        },
+                        onTaskStart: function (info) {
+                            //开始上传
+                            // console.log('onTaskStart', info);
+                        },
+                    },
+                    function (err, data) {
+                        console.log(err, data)
+                        if (err) {
+                            that.$message.error('上传失败!!!' + err)
+                            return
+                        } else {
+                            var img = '//' + data.Location
+                            success(img)
+                        }
+                    }
+                )
+            })
+        },
+    },
+    watch: {
+        value(newValue) {
+            this.myValue = newValue == null ? '' : newValue
+        },
+        myValue(newValue) {
+            console.log(newValue)
+            console.log(tinymce.editors['tinydemo'])
+            // tinymce.editors['tinydemo'].getContent()
+            if (this.triggerChange) {
+                this.$emit('change', newValue)
+            } else {
+                this.$emit('input', newValue)
+            }
+        },
+    },
+}
+</script>
+<style scoped></style>

ファイルの差分が大きいため隠しています
+ 977 - 7
src/views/index.vue


+ 924 - 0
src/views/policy/index.vue

@@ -0,0 +1,924 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="公司名称" prop="companyName">
+        <el-input
+          placeholder="请输入公司名称"
+          v-model="queryParams.companyName"
+          style="width: 240px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="广告主名称" prop="advertiserName">
+        <el-input
+          placeholder="请输入广告主名称"
+          v-model="queryParams.advertiserName"
+          style="width: 240px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="产品名称" prop="productName">
+        <el-input
+          placeholder="请输入广告主名称"
+          v-model="queryParams.productName"
+          style="width: 240px"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item label="投放类型" prop="releaseType">
+        <el-select
+          v-model="queryParams.releaseType"
+          placeholder="选择投放类型"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.releaseTypeList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="返点类型" prop="rebateType">
+        <el-select
+          v-model="queryParams.rebateType"
+          placeholder="请选择返点类型"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.rebateTypeList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="销售" prop="saleName">
+        <el-select
+          v-model="queryParams.saleName"
+          placeholder="请选择销售"
+          clearable
+          filterable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.saleLeaderList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.label"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="时间" prop="createTime">
+        <el-date-picker
+          v-model="queryParams.createTime"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          style="width: 240px"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="saleName">
+        <el-select
+          v-model="queryParams.saleName"
+          placeholder="请选择销售"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.saleLeaderList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="handleAdd"
+          >新增政策</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      ref="multipleTable"
+      style="width: 100%"
+    >
+      <el-table-column
+        label="公司名称"
+        align="center"
+        prop="companyName"
+        fixed
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="广告主名称"
+        align="center"
+        prop="advertiserName"
+        fixed
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="产品名称"
+        align="center"
+        prop="productName"
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="投放类型"
+        align="center"
+        prop="releaseType"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.releaseType">
+            <span v-for="(item, index) in scope.row.releaseType.split(',')">
+              {{ item | releaseTypeChinese }}<br />
+            </span>
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="销售"
+        align="center"
+        prop="saleName"
+        width="150"
+      />
+      <el-table-column
+        label="状态"
+        align="center"
+        prop="approvedStatus"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{
+              scope.row.approvedStatus == 0
+                ? "草稿"
+                : scope.row.approvedStatus == 1
+                ? "待审核"
+                : scope.row.approvedStatus == 2
+                ? "审核中"
+                : scope.row.approvedStatus == 3
+                ? "审核通过"
+                : scope.row.approvedStatus == 4
+                ? "审核拒绝"
+                : "其他"
+            }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="是否预付"
+        align="center"
+        prop="advancePay"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.advancePay == 0 ? "否" : "是" }}
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="账期"
+        align="center"
+        prop="accountingPeriod"
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="返点类型"
+        align="center"
+        prop="rebateType"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.rebateType | rebateTypeChinese }}
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="返点比例"
+        align="center"
+        prop="rebateRate"
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="操盘结算类型"
+        align="center"
+        prop="operateSettlementType"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.operateSettlementType == "1" ? "服务费" : "货品佣金" }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="运营方式"
+        align="center"
+        prop="promotionType"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.promotionType == "0" ? "自运营" : "代运营" }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="政策日期"
+        align="center"
+        prop="policyStartDate"
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        label="备注"
+        align="center"
+        prop="remarks"
+        width="200"
+        showOverflowTooltip
+      >
+      </el-table-column>
+      <!-- 、、操作、审核理由 -->
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAllocationOne(scope.row)"
+            >编辑</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            @click="handlePersonVisible(scope.row)"
+            >查看人员</el-button
+          >
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="审核理由"
+        align="center"
+        prop="remarks"
+        width="200"
+        showOverflowTooltip
+      >
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改参数配置对话框 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="900px"
+      append-to-body
+      :before-close="cancel"
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="100px"
+        :inline="true"
+      >
+        <div style="width: 100%; display: flex">
+          <div style="flex: 1">
+            <el-form-item
+              label="公司名称"
+              prop="companyName"
+              style="width: 100%"
+            >
+              <el-select
+                v-model="form.companyName"
+                placeholder="选择投放类型"
+                clearable
+                style="width: 240px"
+              >
+                <el-option
+                  v-for="item in queryParamsList.policyCustomerList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              label="广告主名称"
+              prop="advertiserName"
+              style="width: 100%"
+            >
+              <el-input
+                disabled
+                placeholder="请输入广告主名称"
+                v-model="form.advertiserName"
+                style="width: 240px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item
+              label="产品名称"
+              prop="productName"
+              style="width: 100%"
+            >
+              <el-input
+                placeholder="请输入产品名称"
+                v-model="form.productName"
+                style="width: 240px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item
+              label="投放类型"
+              prop="releaseType"
+              style="width: 100%"
+            >
+              <el-select
+                v-model="form.releaseType"
+                placeholder="选择投放类型"
+                clearable
+                multiple
+                style="width: 240px"
+              >
+                <el-option
+                  v-for="item in queryParamsList.releaseTypeList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="销售" prop="saleId" style="width: 100%">
+              <el-select
+                v-model="form.saleId"
+                placeholder="请选择销售"
+                clearable
+                style="width: 240px"
+              >
+                <el-option
+                  v-for="item in queryParamsList.saleLeaderList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              label="我司主体"
+              prop="companySubjectId"
+              style="width: 100%"
+            >
+              <el-select
+                v-model="form.companySubjectId"
+                placeholder="请选择我司主体"
+                clearable
+                style="width: 240px"
+              >
+                <el-option
+                  v-for="item in queryParamsList.companySubjectInfoList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              label="运营方式"
+              prop="promotionType"
+              style="width: 100%"
+            >
+              <el-radio-group v-model="form.promotionType">
+                <el-radio-button label="0">自运营</el-radio-button>
+                <el-radio-button label="1">代运营</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+          <div style="flex: 1">
+            <el-form-item
+              label="是否预付"
+              prop="advancePay"
+              v-if="form.releaseType.includes('1')"
+            >
+              <el-radio-group v-model="form.advancePay">
+                <el-radio-button label="0">否</el-radio-button>
+                <el-radio-button label="1">是</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item
+              label="返点类型"
+              prop="rebateType"
+              v-if="form.releaseType.includes('1')"
+            >
+              <el-select
+                v-model="form.rebateType"
+                placeholder="请选择返点类型"
+                clearable
+                style="width: 240px"
+              >
+                <el-option
+                  v-for="item in queryParamsList.rebateTypeList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              label="返点比例"
+              prop="rebateRate"
+              v-if="form.releaseType.includes('1')"
+            >
+              <el-input-number
+                v-model="form.rebateRate"
+                :precision="2"
+                :step="0.01"
+                :min="0"
+              ></el-input-number>
+            </el-form-item>
+            <el-form-item
+              label="账期"
+              prop="accountingPeriod"
+              v-if="form.releaseType.includes('1')"
+            >
+              <el-input-number
+                v-model="form.accountingPeriod"
+                :precision="0"
+                :step="1"
+                :min="1"
+              ></el-input-number>
+            </el-form-item>
+            <el-form-item
+              label="操盘结算类型"
+              prop="operateSettlementType"
+              v-if="form.releaseType.includes('2')"
+            >
+              <el-radio-group v-model="form.operateSettlementType">
+                <el-radio-button label="1">服务费</el-radio-button>
+                <el-radio-button label="2">货品佣金</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="起止时间" prop="createTime">
+              <el-date-picker
+                v-model="form.createTime"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                value-format="yyyy-MM-dd"
+                style="width: 240px"
+              >
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="备注" prop="remarks">
+              <el-input
+                type="textarea"
+                :rows="2"
+                placeholder="请输入内容"
+                v-model="form.remarks"
+                maxlength="500"
+                show-word-limit
+                style="width: 240px"
+              >
+              </el-input>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import vueUpload from "../trader/components/vueUpload";
+import FileUpload from "../trader/components/upload";
+
+import { getQueryRolesList } from "@/api/trader/trader";
+import {
+  getSelectPolicyList,
+  getSelectCompanySubjectInfoList,
+  addSaleFinancePolicyInfo,
+  getSelectPolicyCustomerList,
+} from "@/api/policy/policy";
+
+export default {
+  name: "account-list",
+  components: {
+    vueUpload,
+    FileUpload,
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 是否为编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      openFp: false,
+      personVisible: false,
+      personData: null,
+      personList: [],
+      formFp: {},
+      fileType: [".xls", ".xlsx", ".csv"],
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyName: undefined,
+        advertiserName: undefined,
+        productName: undefined,
+        releaseType: undefined,
+        rebateType: undefined,
+        saleName: undefined,
+        createTime: undefined,
+      },
+      //页面所有的下拉数据
+      queryParamsList: {
+        ksList: [], //快手昵称下拉
+        accountList: [], //账户列表下拉
+        releaseTypeList: [
+          { value: "1", label: "磁力金牛-投流" },
+          { value: "2", label: "磁力金牛-操盘" },
+        ], //账户类型下拉
+        rebateTypeList: [
+          { value: "0", label: "返现" },
+          { value: "1", label: "返货" },
+          { value: "2", label: "返现+返货" },
+        ],
+        saleLeaderList: [], //销售列表
+        allPersonList: [], //所有人
+        companySubjectInfoList: [],
+        policyCustomerList: [],
+      },
+      // 表单参数
+      form: {
+        promotionType: "1",
+        advancePay: "1",
+        operateSettlementType: "1",
+        releaseType: ["1"],
+      },
+      fileList: [],
+      //获取销售线索文件流
+      dateFile: null,
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {
+        companyName: [
+          { required: true, message: "公司名称不能为空", trigger: "blur" },
+          {
+            min: 1,
+            max: 30,
+            message: "公司名称最多30个字,最少1个字",
+            trigger: "blur",
+          },
+        ],
+        advertiserName: [
+          { required: true, message: "广告主名称不能为空", trigger: "blur" },
+          {
+            min: 1,
+            max: 30,
+            message: "广告主名称最多30个字,最少1个字",
+            trigger: "blur",
+          },
+        ],
+        productName: [
+          { required: true, message: "产品名称不能为空", trigger: "blur" },
+          {
+            min: 1,
+            max: 30,
+            message: "产品名称最多30个字,最少1个字",
+            trigger: "blur",
+          },
+        ],
+        releaseType: [
+          { required: true, message: "投放类型不能为空", trigger: "change" },
+        ],
+        saleId: [
+          { required: true, message: "投放类型不能为空", trigger: "change" },
+        ],
+        companySubjectId: [
+          { required: true, message: "我司主体不能为空", trigger: "change" },
+        ],
+        advancePay: [{ required: true, message: "", trigger: "change" }],
+        promotionType: [{ required: true, message: "", trigger: "change" }],
+        rebateType: [
+          { required: true, message: "返点类型不能为空", trigger: "change" },
+        ],
+        accountingPeriod: [
+          { required: true, message: "账期不能为空", trigger: "blur" },
+        ],
+        rebateRate: [
+          { required: true, message: "返点比例不能为空", trigger: "blur" },
+        ],
+        operateSettlementType: [
+          {
+            required: true,
+            message: "操盘结算类型不能为空",
+            trigger: "change",
+          },
+        ],
+        createTime: [
+          {
+            required: true,
+            message: "起止时间不能为空",
+            trigger: "change",
+          },
+        ],
+      },
+
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+    this.getOperatorList();
+    this.getSelectCompanySubjectInfoList();
+    this.getSelectPolicyCustomerList();
+  },
+  watch: {
+    "form.companyName": function (n, o) {
+      if (n) {
+        this.$set(this.form, "advertiserName", n.split("@")[1]);
+      } else {
+        this.$set(this.form, "advertiserName", undefined);
+      }
+    },
+  },
+  filters: {
+    rebateTypeChinese(status) {
+      const statusMap = {
+        0: "返现",
+        1: "返货",
+        2: "返现+返货",
+      };
+      return statusMap[status];
+    },
+    releaseTypeChinese(status) {
+      const statusMap = {
+        1: "磁力金牛-投流",
+        2: "磁力金牛-操盘",
+      };
+      return statusMap[status];
+    },
+  },
+  methods: {
+    getSelectPolicyCustomerList() {
+      getSelectPolicyCustomerList()
+        .then((res) => {
+          this.queryParamsList.policyCustomerList = res.data.map((item) => {
+            return {
+              value:
+                item.ksId + "@" + item.advertiserName + "@" + item.companyName,
+              label: item.companyName,
+            };
+          });
+        })
+        .catch(() => {});
+    },
+    // 获取公司主体列表
+    getSelectCompanySubjectInfoList() {
+      getSelectCompanySubjectInfoList()
+        .then((res) => {
+          this.queryParamsList.companySubjectInfoList = res.data.map((item) => {
+            return {
+              value: item.id,
+              label: item.companySubjectName,
+            };
+          });
+        })
+        .catch(() => {});
+    },
+    // 获取销售列表
+    getOperatorList() {
+      getQueryRolesList({ type: 2 })
+        .then((res) => {
+          this.queryParamsList.saleLeaderList = res.data.map((item) => {
+            return {
+              value: item.userId,
+              label: item.nickName,
+            };
+          });
+        })
+        .catch((error) => {});
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      var params = { ...this.queryParams, createUserId: this.userId };
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
+
+      getSelectPolicyList(params).then((response) => {
+        this.typeList = response.data.rows;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.ids = null;
+      this.open = true;
+      this.edit = false;
+      this.title = "新增政策";
+    },
+    /** 新增政策确定按钮操作 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          console.log(this.form);
+          this.confirmLoading = true;
+          let formData = { ...this.form };
+          formData.policyStartDate = formData.createTime[0];
+          formData.policyEndDate = formData.createTime[1];
+          formData.createUserId = this.userId;
+          formData.releaseType = formData.releaseType.join();
+          formData.advertiserName = this.form.companyName.split("@")[1];
+          formData.ksId = +this.form.companyName.split("@")[0];
+          formData.companyName = this.form.companyName.split("@")[2];
+          if (!this.ids) {
+          } else {
+            formData.id = this.ids;
+          }
+          let { createTime, ...params } = formData;
+          addSaleFinancePolicyInfo(params)
+            .then((res) => {
+              this.confirmLoading = false;
+              this.$message.success(res.msg);
+              this.ids = null;
+              this.cancel();
+              this.handleQuery();
+            })
+            .catch((err) => {
+              this.confirmLoading = false;
+            });
+        }
+      });
+    },
+    /** 新增政策取消按钮操作 */
+    cancel() {
+      this.form = {
+        promotionType: "1",
+        advancePay: "1",
+        operateSettlementType: "1",
+        releaseType: ["1"],
+      };
+      this.resetForm("form");
+      this.open = false;
+    },
+    handleDelete(row) {},
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "system/dict/type/export",
+        {
+          ...this.queryParams,
+        },
+        `type_${new Date().getTime()}.xlsx`
+      );
+    },
+    /** 刷新缓存按钮操作 */
+    handleRefreshCache() {
+      refreshCache().then(() => {
+        this.$modal.msgSuccess("刷新成功");
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+::v-deep .el-input-number__decrease {
+  display: none;
+}
+::v-deep .el-input-number__increase {
+  display: none;
+}
+::v-deep .el-textarea__inner {
+  padding: 5px 15px 40px 15px;
+}
+::v-deep .el-textarea .el-input__count {
+  color: #909399;
+  background: #ffffff;
+  position: absolute;
+  font-size: 12px;
+  bottom: 1px;
+  right: 20px;
+  width: 90%;
+  text-align: right;
+}
+</style>

+ 653 - 0
src/views/promoter/promoterDetail.vue

@@ -0,0 +1,653 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+  line-height: 30px;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+  line-height: 30px;
+}
+.tableBox {
+  width: 100%;
+}
+.prefix {
+  display: inline-block;
+  width: 3px;
+  height: 15px;
+  background: rgb(104, 163, 253);
+  position: relative;
+  top: 2px;
+  margin-right: 5px;
+}
+.dh p {
+  font-size: 14px;
+}
+.dh-data p {
+  font-size: 16px;
+}
+.main-box {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+}
+</style>
+<template>
+  <div class="app-container" id="loading" v-loading="loading" style="min-height:600px">
+    <el-card v-if="detailData">
+      <div style="display: flex; width: 500px; margin-bottom: 30px">
+        <div style="margin-right: 30px">
+          <img
+            :src="detailData.promoterUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </div>
+        <div style="width: 60%" class="item-name-calss">
+          <a
+            style="
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              overflow: hidden;
+              width: 100%;
+            "
+            :title="detailData.promoterNickName"
+          >
+            {{ detailData.promoterNickName }}
+          </a>
+          <p>达人Id:{{ detailData.promoterId }}</p>
+          <p>{{ detailData.province }} | 粉丝:{{ detailData.fansNumber }}</p>
+        </div>
+      </div>
+      <el-row class="top-sum" :gutter="24">
+        <el-col :span="4">
+          <el-card shadow="never" class="card-show">
+            <!-- ringRatio: 0, -->
+            <h4><span class="prefix"></span>带货内容</h4>
+            <div style="width: 100%; height: 175px" class="item-name-calss dh">
+              <p>品类要求:{{ detailData.categoryRequirement }}</p>
+              <p>佣金要求:{{ detailData.commissionRequirement }}</p>
+              <p>推广商品数:{{ dataList.promotedProductsNum }}</p>
+              <p>总销售额:{{ detailData.totalSale }}</p>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="10">
+          <el-card shadow="never" class="card-show">
+            <h4><span class="prefix"></span>热销类目</h4>
+            <el-table :data="dataList.hotSaleChannelInfo">
+              <el-table-column
+                label="类目"
+                align="center"
+                prop="hotSaleChannelName"
+              >
+              </el-table-column>
+              <el-table-column
+                label="均价"
+                align="center"
+                prop="avgPrice"
+                width="55"
+              >
+              </el-table-column>
+              <el-table-column label="销售额" align="center" prop="avgGmv">
+              </el-table-column>
+              <el-table-column
+                label="佣金参考"
+                align="center"
+                prop="intervalCommissionRate"
+              >
+              </el-table-column>
+            </el-table>
+          </el-card>
+        </el-col>
+        <el-col :span="10">
+          <el-card shadow="never" class="card-show">
+            <h4><span class="prefix"></span>热销品牌</h4>
+            <el-table :data="dataList.hotSaleBrandInfo">
+              <el-table-column
+                label="品牌"
+                align="center"
+                prop="hotSaleBrandTitle"
+              >
+              </el-table-column>
+              <el-table-column label="均价" align="center" prop="avgPrice">
+              </el-table-column>
+              <el-table-column label="销售额" align="center" prop="avgGmv">
+              </el-table-column>
+            </el-table>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-card>
+    <el-card v-if="dataList" style="margin-top: 20px">
+      <h4>
+        <span class="prefix"></span>直播带货数据
+        <el-select
+          v-model="zbType"
+          placeholder="请选择类型"
+          clearable
+          style="width: 240px; float: right; padding: 3px 0"
+          @change="changeEchartsType"
+        >
+          <el-option label="评论数" value="commentsCount" />
+          <el-option label="点赞数" value="likesCount" />
+          <el-option label="直播时长" value="liveMinuteDuration" />
+          <el-option label="场观人数" value="liveVisitorCount" />
+          <el-option label="在线人数峰值" value="maxVisitorCount" />
+          <el-option label="分享数" value="sharesCount" />
+        </el-select>
+      </h4>
+      <div class="main-box">
+        <div style="width: 49%">
+          <el-row class="top-sum" :gutter="15">
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>直播次数</p>
+                <p>{{ dataList.promoteLiveCount }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>场均销售额</p>
+                <p>{{ dataList.liveStreamGMV }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>进入直播间人数</p>
+                <p>{{ dataList.liveStreamVisitorCount }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>直播GPM</p>
+                <p>{{ dataList.liveStreamGPM }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>平均在线人数</p>
+                <p>{{ dataList.avgVisitorOnlineCount }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>在线人数峰值</p>
+                <p>{{ dataList.maxSameTimeVisitorCount }}</p>
+              </div></el-col
+            >
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>人均观看时长</p>
+                <p>{{ dataList.avgViewTime }}</p>
+              </div></el-col
+            >
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>互动率</p>
+                <p>{{ dataList.interactionRate }}</p>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+        <div style="width: 49%">
+          <div
+            id="echart"
+            ref="echart"
+            style="height: 250px; width: 100%"
+          ></div>
+        </div>
+      </div>
+    </el-card>
+    <el-card v-if="dataList" style="margin-top: 20px">
+      <h4>
+        <span class="prefix"></span>短视频带货数据
+        <el-select
+          v-model="dspType"
+          placeholder="请选择类型"
+          clearable
+          style="width: 240px; float: right; padding: 3px 0"
+          @change="changeEchartsDspType"
+        >
+          <el-option label="分享数" value="shareCount" />
+          <el-option label="播放数" value="videoWatchCount" />
+          <el-option label="点赞数" value="likeCount" />
+          <el-option label="评论数" value="commentCount" />
+        </el-select>
+      </h4>
+      <div class="main-box">
+        <div style="width: 49%">
+          <el-row class="top-sum" :gutter="15">
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>视频数量</p>
+                <p>{{ dataList.videoCount }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>视频播放量</p>
+                <p>{{ dataList.videoWatchCount }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>带货视频销售额</p>
+                <p>{{ dataList.totalSale }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>视频GPM</p>
+                <p>{{ dataList.videoGPM }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>单视频平均销售额</p>
+                <p>{{ dataList.avgVideoSales }}</p>
+              </div>
+            </el-col>
+            <el-col :span="6">
+              <div
+                style="width: 100%; height: 100px"
+                class="item-name-calss dh-data"
+              >
+                <p>单视频平均观看人数</p>
+                <p>{{ dataList.avgVideoViewers }}</p>
+              </div></el-col
+            >
+            <el-col :span="6"> </el-col>
+            <el-col :span="6"> </el-col>
+          </el-row>
+        </div>
+        <div style="width: 49%">
+          <div
+            id="echartDsp"
+            ref="echartDsp"
+            style="height: 250px; width: 100%"
+          ></div>
+        </div>
+      </div>
+    </el-card>
+    <el-card v-if="dataList" style="margin-top: 20px">
+      <h4><span class="prefix"></span>粉丝特性</h4>
+
+      <el-tag
+        v-for="(item, index) in dataList.fanCharacteristic"
+        :key="index"
+        style="margin: 10px"
+        >{{ item.name }}/{{ item.roi }}</el-tag
+      >
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { getPromoterDetail } from "@/api/promoter/promoter";
+import { Loading } from "element-ui";
+var echarts = require("echarts");
+export default {
+  name: "promoter-detail",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        promoterId: undefined,
+        promoterNickName: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      detailData: null,
+      dataList: null,
+      zbType: "liveVisitorCount",
+      dspType: "videoWatchCount",
+    };
+  },
+  created() {
+    if (this.$route && this.$route.query.id) {
+      this.getItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      //   this.getList();
+      //   this.initEchart('echart', this.handlerEchartOption(res.result, 'cost'))
+    });
+  },
+  methods: {
+    getItemDetail() {
+      this.loading = true
+      getPromoterDetail({
+        id: this.$route.query.id,
+      }).then((response) => {
+        this.loading = false
+        this.detailData = response.data.promoterInfo;
+        this.dataList = response.data.result;
+        this.$nextTick(() => {
+          this.initEchart(
+            "echart",
+            this.handlerEchartOption(this.dataList.liveInfo, this.zbType, "zb")
+          );
+          this.initEchart(
+            "echartDsp",
+            this.handlerEchartOption(
+              this.dataList.shortVideosInfo,
+              this.dspType,
+              "dsp"
+            )
+          );
+        });
+      });
+    },
+    changeEchartsType(e) {
+      console.log(e);
+      if (!!e) {
+        this.initEchart(
+          "echart",
+          this.handlerEchartOption(this.dataList.liveInfo, this.zbType, "zb")
+        );
+      } else {
+        this.$message({
+          message: "请选择类型",
+          type: "error",
+        });
+      }
+    },
+    changeEchartsDspType(e) {
+      console.log(e);
+      if (!!e) {
+        this.initEchart(
+          "echartDsp",
+          this.handlerEchartOption(
+            this.dataList.shortVideosInfo,
+            this.dspType,
+            "dsp"
+          )
+        );
+      } else {
+        this.$message({
+          message: "请选择类型",
+          type: "error",
+        });
+      }
+    },
+    /** 获取echart的值 */
+    initEchart(idName, optionName) {
+      let that = this;
+      const chart = this.$refs[idName];
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName));
+        myChart.setOption(optionName);
+        window.addEventListener("resize", function () {
+          that.clientWidth = document.documentElement.clientWidth - 224;
+          myChart.resize();
+        });
+      }
+    },
+    /** echarts数据展示 订单统计*/
+    handlerEchartOption(data, typeShow, type) {
+      var typeName;
+      if (type == "zb") {
+        switch (typeShow) {
+          case "commentsCount":
+            typeName = "评论数";
+            break;
+          case "likesCount":
+            typeName = "点赞数";
+            break;
+          case "liveMinuteDuration":
+            typeName = "直播时长";
+            break;
+          case "liveVisitorCount":
+            typeName = "场观人数";
+            break;
+          case "maxVisitorCount":
+            typeName = "在线人数峰值";
+            break;
+          case "sharesCount":
+            typeName = "分享数";
+            break;
+        }
+      } else {
+        switch (typeShow) {
+          case "shareCount":
+            typeName = "分享数";
+            break;
+          case "videoWatchCount":
+            typeName = "播放数";
+            break;
+          case "likeCount":
+            typeName = "点赞数";
+            break;
+          case "commentCount":
+            typeName = "评论数";
+            break;
+        }
+      }
+
+      let option = {
+        noDataLoadingOption: {
+          text: "暂无数据",
+          effect: "bubble",
+          effectOption: {
+            effect: {
+              n: 0,
+            },
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          // formatter: function(params) {
+          // 	if(typeShow == 'play_duration_3s'){
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}%`
+          // 	}else{
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}`
+          // 	}
+
+          // },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        legend: {
+          icon: "circle",
+          top: "5%",
+          right: "5%",
+          itemWidth: 6,
+          itemGap: 20,
+          color: "rgb(16,79,255)",
+          textStyle: {
+            color: "rgb(16,79,255)",
+          },
+        },
+        xAxis: {
+          type: "category",
+          data: data.map((item) => {
+            return item.date;
+          }),
+          boundaryGap: false,
+          // 坐标轴线
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          // 分割线
+          splitLine: {
+            show: true,
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        yAxis: {
+          type: "value",
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          splitLine: {
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        series: [
+          {
+            smooth: true,
+            name: typeName,
+
+            type: "line",
+            stack: "总量",
+            data: data.map((item) => {
+              return item[typeShow];
+            }),
+            symbol: "circle",
+            symbolSize: 2,
+            symbolColor: "rgb(16,79,255)",
+            lineStyle: {
+              normal: {
+                width: 5,
+                color: "rgb(16,79,255)",
+              },
+            },
+            itemStyle: {
+              borderColor: "#ffffff",
+              borderWidth: 2,
+              color: "rgb(16,79,255)",
+            },
+          },
+        ],
+      };
+      return option;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getItemDetail();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 660 - 0
src/views/promoter/promoterList.vue

@@ -0,0 +1,660 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          placeholder="请输入达人名称"
+          style="width: 240px"
+          v-model="queryParams.promoterNickName"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="达人ID" prop="promoterId">
+        <el-input
+          placeholder="请输入达人ID"
+          style="width: 240px"
+          v-model="queryParams.promoterId"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-add"
+          size="mini"
+          @click="addNew"
+          >新增达人</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-table v-loading="loading" :data="typeList" ref="multipleTable">
+      <el-table-column
+        label="达人名称"
+        align="center"
+        prop="promoterNickName"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.promoterUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <a
+                @click="toIndexDetail(scope.row)"
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.promoterNickName"
+              >
+                {{ scope.row.promoterNickName }}
+              </a>
+              <p>达人Id: {{ scope.row.promoterId }}</p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="粉丝数" align="center" prop="fansNumber">
+      </el-table-column>
+      <el-table-column label="总销售额" align="center" prop="totalSale">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.totalSale">
+            {{ scope.row.totalSale }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="所属渠道" align="center" prop="userName">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.userName">
+            {{ scope.row.userName }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="佣金要求"
+        align="center"
+        prop="commissionRequirement"
+      >
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.commissionRequirement">
+            {{ scope.row.commissionRequirement }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="200px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAddbroadcast(scope.row)"
+            >修改地址</el-button
+          >
+          <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
+            >复制</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加直播 -->
+    <el-dialog
+      :title="!!ids ? '修改地址' : '新增达人'"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        :rules="rulesBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <div v-if="!ids">
+          <el-form-item label="创建人" prop="userName" style="width: 100%">
+            {{ $store.getters.name }}
+          </el-form-item>
+          <el-form-item
+            label="快手ID"
+            prop="promoterId"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入快手ID"
+              style="width: 240px"
+              v-model="formBroadcast.promoterId"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="佣金要求"
+            prop="commissionRequirement"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入佣金要求"
+              style="width: 240px"
+              v-model="formBroadcast.commissionRequirement"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="品类要求"
+            prop="categoryRequirement"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入品类要求"
+              style="width: 240px"
+              v-model="formBroadcast.categoryRequirement"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="收货人"
+            prop="consignee"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入收货人"
+              style="width: 240px"
+              v-model="formBroadcast.consignee"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="联系方式"
+            prop="phone"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入联系方式"
+              style="width: 240px"
+              v-model="formBroadcast.phone"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="发货地址"
+            prop="promoterAddress"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入发货地址"
+              style="width: 100%"
+              type="textarea"
+              :rows="2"
+              v-model="formBroadcast.promoterAddress"
+            >
+            </el-input>
+          </el-form-item>
+        </div>
+        <div v-else>
+          <el-form-item
+            label="达人名称"
+            prop="promoterNickName"
+            style="width: 100%"
+          >
+            {{ formBroadcast.promoterNickName }}({{ formBroadcast.promoterId }})
+          </el-form-item>
+          <el-form-item
+            label="收货人"
+            prop="consignee"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入收货人"
+              style="width: 240px"
+              v-model="formBroadcast.consignee"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="联系方式"
+            prop="phone"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入联系方式"
+              style="width: 240px"
+              v-model="formBroadcast.phone"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="发货地址"
+            prop="promoterAddress"
+            style="width: 100%"
+            class="entire-line"
+          >
+            <el-input
+              placeholder="请输入发货地址"
+              style="width: 100%"
+              type="textarea"
+              :rows="2"
+              v-model="formBroadcast.promoterAddress"
+            >
+            </el-input>
+          </el-form-item>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="submitFormBroadcast"
+          :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { refreshCache } from "@/api/system/dict/type";
+import {
+  getPromoterList,
+  addPromoter,
+  editPromoter,
+} from "@/api/promoter/promoter";
+export default {
+  name: "account-list",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      //上传文件类型
+      fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      openFp: false,
+      formFp: {},
+      // 是否可编辑
+      edit: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        promoterNickName: undefined,
+        promoterId: undefined,
+      },
+      //页面所有的下拉数据
+      queryParamsList: {},
+      // 表单参数
+      form: {},
+      formBroadcast: {},
+      //上传报表下拉数据
+      formList: {},
+      fileList: [],
+      accept: "",
+      //获取销售线索文件流
+      dateFile: new FormData(),
+      //销售线索上传loading
+      confirmLoading: false,
+      // 表单校验
+      rules: {},
+      rulesBroadcast: {
+        promoterId: {
+          required: true,
+          message: "快手ID必填",
+          trigger: "blur",
+        },
+        consignee: {
+          required: true,
+          message: "收货人必填",
+          trigger: "blur",
+        },
+        phone: {
+          required: true,
+          message: "联系方式必填",
+          trigger: "blur",
+        },
+        promoterAddress: [
+          {
+            required: true,
+            message: "发货地址必填",
+            trigger: "blur",
+          },
+          {
+            min: 5,
+            max: 200,
+            message: "发货地址最少输入5个字符",
+            trigger: "change",
+          },
+        ],
+      },
+      // 分配销售展示列表
+      ksInfo: null,
+      userId: null,
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.getList();
+  },
+  filters: {},
+  methods: {
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/promoter/detail",
+        query: {
+          id: item.id,
+        },
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+
+      getPromoterList({ userId: this.userId, ...this.queryParams }).then(
+        (response) => {
+          this.typeList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("formBroadcast");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    addNew() {
+      this.openAllocation = true;
+      this.edit = false;
+      this.ids = null;
+      this.confirmLoading = false;
+      this.formBroadcast = {};
+      setTimeout(() => {
+        this.$refs.formBroadcast.clearValidate();
+      }, 0);
+    },
+    /** 编辑地址 新增达人*/
+    handleAddbroadcast(item) {
+      this.ids = item.id;
+      this.edit = true;
+      this.openAllocation = true;
+      this.$set(this.formBroadcast, "consignee", item.consignee);
+      this.$set(this.formBroadcast, "phone", item.phone);
+      this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
+      this.$set(this.formBroadcast, "promoterNickName", item.promoterNickName);
+      this.$set(this.formBroadcast, "promoterId", item.promoterId);
+    },
+    copyInfomation(item) {
+      if (navigator.clipboard && window.isSecureContext) {
+        navigator.clipboard
+          .writeText(
+            `
+收货人: ${item.consignee}
+手机号: ${item.phone}
+收货地址: ${item.promoterAddress}`
+          )
+          .then(() => {
+            this.$message.success("复制成功");
+          })
+          .catch((err) => {
+            this.$message.error("复制失败");
+          });
+      } else {
+        // 创建text area
+        const textArea = document.createElement("textarea");
+        textArea.value = `
+收货人: ${item.consignee}
+手机号: ${item.phone}
+收货地址: ${item.promoterAddress}`;
+        // 使text area不在viewport,同时设置不可见
+        document.body.appendChild(textArea);
+        textArea.focus();
+        textArea.select();
+        return new Promise((resolve, reject) => {
+          // 执行复制命令并移除文本框
+          document.execCommand("copy")
+            ? resolve()
+            : reject(new Error("出错了"));
+          textArea.remove();
+        }).then(
+          () => {
+            this.$message.success("复制成功");
+          },
+          () => {
+            this.$message.error("复制失败");
+          }
+        );
+      }
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+    },
+    /** 新增直播确定按钮 */
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          this.confirmLoading = true;
+          let formData = {
+            userId: this.userId,
+            userName: this.$store.getters.name,
+            ...this.formBroadcast,
+          };
+
+          if (!this.ids) {
+            addPromoter(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("新增成功");
+                this.openAllocation = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          } else {
+            formData.id = this.ids;
+            editPromoter(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("修改成功");
+                this.openAllocation = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          var fileList = this.$refs.fileUploadDialog.fileList;
+          var dapanUrls = this.$refs.fileUpload.fileList;
+          var portraitUrls = this.$refs.fileUploadFx.fileList;
+          if (
+            fileList.length == 0 &&
+            dapanUrls.length == 0 &&
+            portraitUrls.length == 0
+          ) {
+            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
+            return;
+          } else {
+            this.confirmLoading = true;
+            let formData = new FormData();
+            this.ids;
+            formData.append("id", this.ids);
+            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
+            formData.append(
+              "dapanUrls",
+              JSON.stringify(
+                dapanUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            formData.append(
+              "portraitUrls",
+              JSON.stringify(
+                portraitUrls.map((item) => {
+                  return item.url;
+                })
+              )
+            );
+            fileList.forEach((file) => formData.append("files", file.raw));
+            dataUpload(formData)
+              .then((res) => {
+                this.confirmLoading = false;
+                this.$message.success("上传成功");
+                this.open = false;
+                this.ids = null;
+                this.cancel();
+                this.handleQuery();
+              })
+              .catch((err) => {
+                this.confirmLoading = false;
+              });
+          }
+          console.log(fileList, dapanUrls, portraitUrls);
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.entire-line {
+  width: 100%;
+  ::v-deep .el-form-item__content {
+    width: 60%;
+  }
+}
+::v-deep .el-form-item__label {
+  white-space: nowrap;
+}
+</style>
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+  text-align: left;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+
+</style>

+ 582 - 0
src/views/supplyChain/claim.vue

@@ -0,0 +1,582 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="人员名称" prop="userId">
+        <el-select
+          filterable
+          v-model="queryParams.userId"
+          placeholder="人员名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0'
+                    ? 'backgroundColor:green'
+                    : 'backgroundColor:red'
+                "
+                >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="认领状态" prop="status">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择认领状态"
+          clearable
+          style="width: 240px"
+        >
+          <el-option label="已认领" :value="2" />
+          <el-option label="未认领" :value="1" />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <p
+      style="
+        width: 100%;
+        height: 40px;
+        background: rgb(241, 247, 254);
+        border: 1px solid rgb(227, 237, 250);
+        line-height: 40px;
+        padding: 0 30px;
+        font-size: 14px;
+        display: flex;
+        margin-bottom:15px
+      "
+    >
+      <span>
+        商品总数:<a style="display: inline-block" @click="search()">{{
+          itemSummary.itemTotal
+        }}</a></span
+      >
+      <span style="margin: 0 20px"
+        >已认领商品数:<a style="display: inline-block" @click="search('2')">{{
+          itemSummary.claimCount
+        }}</a></span
+      >
+      <span>
+        未认领商品数:<a style="display: inline-block" @click="search('1')">{{
+          itemSummary.unClaimCount
+        }}</a></span
+      >
+    </p>
+    <!-- this.itemSummary = {
+          itemTotal: res.itemTotal,
+          claimCount: res.claimCount,
+          unClaimCount: res.unClaimCount,
+        }; -->
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <!-- <el-table-column
+        label="商品图片"
+        align="center"
+        prop="imageUrl"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imageUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" align="center" prop="itemTitle">
+      </el-table-column> -->
+      <el-table-column
+        label="商品名称"
+        align="center"
+        prop="itemTitle"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.imageUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>
+                佣金率:
+                {{
+                  scope.row.itemCommissionRate
+                    ? scope.row.itemCommissionRate / 10 + "%"
+                    : "-"
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="商品Id" align="center" prop="itemId" /> -->
+      <el-table-column label="价格" align="center" prop="reservePrice">
+        <template slot-scope="scope">
+          {{ (scope.row.reservePrice / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate / 10 + "%" }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="认领人员" align="center" prop="userName">
+        <template slot-scope="scope">
+          {{ !!scope.row.userName ? scope.row.userName : "-" }}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" prop="action">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            :disabled="!!scope.row.userName"
+            >认领</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            :disabled="scope.row.disabled"
+            >解绑</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <el-dialog
+      title="绑定认领人员"
+      :visible.sync="dialogFormVisible"
+      width="400px"
+    >
+      <el-form :model="form">
+        <el-form-item label="认领人员">
+          <el-select
+            filterable
+            v-model="form.userId"
+            placeholder="人员名称"
+            clearable
+            style="width: 240px"
+          >
+            <el-option
+              v-for="item in queryParamsList.personList"
+              :key="item.userId"
+              :label="item.nickMame"
+              :value="item.userId + '@' + item.nickMame"
+            >
+              <div style="display: flex">
+                <span
+                  style="
+                    width: 10px;
+                    height: 10px;
+                    border-radius: 50%;
+                    background-color: green;
+                    position: relative;
+                    top: 12px;
+                    margin-right: 5px;
+                  "
+                  :style="
+                    item.status == '0'
+                      ? 'backgroundColor:green'
+                      : 'backgroundColor:red'
+                  "
+                  >{{ item.value }}</span
+                ><span>{{ item.nickMame }}</span>
+              </div>
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          @click="
+            dialogFormVisible = false;
+            form.userId = undefined;
+          "
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="okBd" :loading="logLoading"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getBindUserItemList,
+  getUnbindUser,
+  getBindUser,
+  getSupplyChainUserList,
+  getItemBindSummary,
+} from "@/api/supplyChain/supplyChain";
+export default {
+  name: "Claim",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      dialogFormVisible: false,
+      itemId: undefined,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      remark: [],
+      name: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: undefined,
+        itemTitle: undefined,
+        userId: undefined,
+        status: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {
+        personList: [],
+      },
+      form: {
+        userId: "",
+      },
+      itemSummary: {
+        itemTotal: 0,
+        claimCount: 0,
+        unClaimCount: 0,
+      },
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    this.remark = this.$store.getters.roles;
+    this.name = this.$store.getters.name;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getPersonList();
+      this.getItemBindSummary();
+      this.getList();
+    });
+  },
+  computed: {
+    isDisabled() {
+      if (
+        this.remark.includes("admin") ||
+        this.remark.includes("supplyChainAdmin")
+      ) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+  },
+  methods: {
+    search(type) {
+      if (type) {
+        this.queryParams.status = +type;
+      } else {
+        this.queryParams.status = undefined;
+      }
+
+      this.handleQuery();
+    },
+    getItemBindSummary() {
+      getItemBindSummary().then((res) => {
+        this.itemSummary = {
+          itemTotal: res.itemTotal,
+          claimCount: res.claimCount,
+          unClaimCount: res.unClaimCount,
+        };
+      });
+    },
+    handleDelete(item) {
+      this.$confirm("确定解绑吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          getUnbindUser({
+            itemId: item.itemId,
+            userId: item.userId,
+            nikeName: item.userName,
+          }).then((res) => {
+            if (res.code == 0) {
+              this.$message.success(res.message);
+              this.getList();
+            } else {
+              this.$message.error(res.message);
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    handleUpdate(item) {
+      if (this.remark.includes("admin")) {
+        this.dialogFormVisible = true;
+
+        this.itemId = item.itemId;
+      } else {
+        getBindUser({
+          itemId: item.itemId,
+          userId: this.userId,
+          nikeName: this.name,
+        }).then((res) => {
+          this.logLoading = false;
+          if (res.code == 0) {
+            this.dialogFormVisible = false;
+            this.$message.success(res.message);
+            this.getList();
+          } else {
+            this.$message.error(res.message);
+          }
+        });
+      }
+    },
+    okBd() {
+      if (!!this.form.userId) {
+        this.logLoading = true;
+        getBindUser({
+          itemId: this.itemId,
+          userId: this.form.userId.split("@")[0],
+          nikeName: this.form.userId.split("@")[1],
+        }).then((res) => {
+          this.logLoading = false;
+          if (res.code == 0) {
+            this.dialogFormVisible = false;
+            this.$message.success(res.message);
+            this.getList();
+          } else {
+            this.$message.error(res.message);
+          }
+        });
+      } else {
+        this.$message.error("请选择人员");
+      }
+    },
+    getPersonList() {
+      getSupplyChainUserList().then((response) => {
+        this.queryParamsList.personList = response.rows;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getBindUserItemList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        if (response.rows.length == 0 && response.total > 0) {
+          this.queryParams.pageNum = this.queryParams.pageNum - 1;
+          this.getList();
+        } else {
+          this.typeList = response.rows.map((item) => {
+            return {
+              ...item,
+              disabled: this.isDisabled
+                ? item.userId != this.userId
+                : !item.userId
+                ? true
+                : false,
+            };
+          });
+          this.total = response.total;
+          this.loading = false;
+        }
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 379 - 0
src/views/supplyChain/claimOk.vue

@@ -0,0 +1,379 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <!-- <el-table-column
+        label="商品图片"
+        align="center"
+        prop="imageUrl"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imageUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" align="center" prop="itemTitle">
+      </el-table-column> -->
+      <el-table-column
+        label="商品名称"
+        align="center"
+        prop="itemTitle"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.imageUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>
+                佣金率:
+                {{
+                  scope.row.itemCommissionRate
+                    ? scope.row.itemCommissionRate / 10 + "%"
+                    : "-"
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="认领人" align="center" prop="userName" />
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column
+        label="失效订单数"
+        align="center"
+        prop="invalidOrderNUm"
+      />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="发货数" align="center" prop="deliveryNum">
+      </el-table-column>
+      <el-table-column label="发货率" align="center" prop="deliveryRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum">
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionRate
+              ? scope.row.regimentalPromotionRate / 10 + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{
+            scope.row.payAmount ? (scope.row.payAmount / 100).toFixed(2) : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+              ? (scope.row.regimentalPromotionAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+              ? (scope.row.totalRegimentalSettleAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import { getUserItemDetail } from "@/api/supplyChain/supplyChain";
+export default {
+  name: "ClaimOk",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getList();
+    });
+  },
+  methods: {
+    toDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getUserItemDetail(
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            userId: this.$store.getters.remark == "管理员" ? null : this.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 524 - 0
src/views/supplyChain/goods.vue

@@ -0,0 +1,524 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+.item-name-calss p {
+  margin: 0;
+  text-align: left;
+}
+.tableBox {
+  width: 100%;
+}
+::v-deep .el-table {
+
+  height: calc(100vh - 280px);
+}
+</style>
+<template>
+  <div class="app-container" style="height: 100%">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="人员名称" prop="userId">
+        <el-select
+          filterable
+          v-model="queryParams.userId"
+          placeholder="人员名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0'
+                    ? 'backgroundColor:green'
+                    : 'backgroundColor:red'
+                "
+                >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <div class="tableBox">
+      <el-table
+        v-loading="loading"
+        :data="typeList"
+        @selection-change="handleSelectionChange"
+        ref="multipleTable"
+        @sort-change="sortChange"
+        height="calc(100vh - 100px);"
+      >
+        <!-- <el-table-column type="selection" width="55" align="center" /> -->
+        <!-- <el-table-column
+        label="商品图片"
+        align="center"
+        prop="imageUrl"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imageUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </template>
+      </el-table-column> -->
+        <el-table-column
+          label="商品名称"
+          align="center"
+          prop="itemTitle"
+          width="300"
+        >
+          <template slot-scope="scope">
+            <div style="display: flex; width: 100%">
+              <div style="width: 40%">
+                <img
+                  :src="scope.row.imageUrl"
+                  alt=""
+                  style="width: 70px; height: auto"
+                />
+              </div>
+              <div style="width: 60%" class="item-name-calss">
+                <a
+                  @click="toIndexDetail(scope.row)"
+                  style="
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    width: 100%;
+                  "
+                  :title="scope.row.itemTitle"
+                >
+                  {{ scope.row.itemTitle }}
+                </a>
+                <p>商品Id: {{ scope.row.itemId }}</p>
+                <p>商品单价: {{ scope.row.reservePrice / 100 }}元</p>
+
+                <p>
+                  佣金率:
+                  {{
+                    scope.row.itemCommissionRate
+                      ? scope.row.itemCommissionRate / 10 + "%"
+                      : "-"
+                  }}
+                </p>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="订单数"
+          align="center"
+          prop="orderNum"
+          sortable="custom"
+        >
+        </el-table-column>
+        <el-table-column
+          label="有效订单数"
+          align="center"
+          prop="validOrderNUm"
+          sortable="custom"
+        />
+        <el-table-column
+          label="有效率"
+          align="center"
+          prop="validRadio"
+          sortable="custom"
+        >
+          <template slot-scope="scope">
+            {{
+              scope.row.validRadio
+                ? (scope.row.validRadio * 100).toFixed(2) + "%"
+                : "-"
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="发货数"
+          align="center"
+          prop="deliveryNum"
+          sortable="custom"
+        >
+        </el-table-column>
+        <el-table-column
+          label="发货率"
+          align="center"
+          prop="deliveryRadio"
+          sortable="custom"
+        >
+          <template slot-scope="scope">
+            {{
+              scope.row.deliveryRadio
+                ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+                : "-"
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="未发货数"
+          align="center"
+          prop="notDeliveryNum"
+          sortable="custom"
+        >
+        </el-table-column>
+        <el-table-column label="归属人" align="center" prop="userName">
+        </el-table-column>
+        <el-table-column label="top3的达人" align="center" prop="topAnchors">
+          <template slot-scope="scope">
+            <!-- <a
+            v-for="(item, index) in scope.row.topAnchors"
+            :key="index"
+            @click="toDetail(item)"
+            style="text-align: left"
+          >
+            <img
+              :src="item.imageUrl"
+              alt=""
+              style="width: 50px; height: auto"
+            />
+            {{ item.promoterNickName }}(Id:{{ item.promoterId }};订单数量:{{
+              item.orderNum
+            }})
+          </a> -->
+            <el-popover
+              placement="top"
+              title="top3"
+              width="600"
+              trigger="hover"
+              @show="showTitle(scope.row)"
+            >
+              <a
+                v-for="(item, index) in videoTag"
+                :key="index"
+                @click="toDetail(item)"
+                style="text-align: left; display: block"
+              >
+                {{ item.promoterNickName }}(Id:{{ item.promoterId }};订单数量:{{
+                  item.orderNum
+                }})
+              </a>
+              <a slot="reference">查看</a>
+            </el-popover>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getItemList,
+  downFilePost,
+  getTopPromoterByItemId,
+  getSupplyChainUserList,
+} from "@/api/supplyChain/supplyChain";
+export default {
+  name: "Goods",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: undefined,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {
+        personList: [],
+      },
+      videoTag: [],
+      videoVisibleChange: undefined,
+      prop: "orderNum",
+      sort: "desc",
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getPersonList();
+      this.getList();
+    });
+  },
+  methods: {
+    showTitle(visible) {
+      console.log(visible);
+      if (this.videoVisibleChange != visible.itemId) {
+        this.videoVisibleChange = visible.itemId;
+        this.videoTag = [];
+        getTopPromoterByItemId(
+          this.addDateRange(
+            { itemId: visible.itemId },
+            this.uploadDate,
+            "orderStartDate",
+            "orderEndDate"
+          )
+        ).then((res) => {
+          this.videoTag = res.rows;
+        });
+      } else {
+        return;
+      }
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost(
+        "/isv/supply_chain/exportOrder",
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `商品列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    sortChange(col, prop, order) {
+      this.prop = col.prop;
+      this.sort = !!col.order
+        ? col.order == "descending"
+          ? "desc"
+          : "asc"
+        : "desc";
+      this.handleQuery();
+    },
+    getPersonList() {
+      getSupplyChainUserList().then((response) => {
+        this.queryParamsList.personList = response.rows;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getItemList(
+        this.addDateRange(
+          { ...this.queryParams, fieId: this.prop, sort: this.sort },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 325 - 0
src/views/supplyChain/goodsDetails.vue

@@ -0,0 +1,325 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        {{ $route.query ? $route.query.name : "-" }}
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        {{ $route.query ? $route.query.id : "-" }}
+      </el-form-item>
+      <br />
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          v-model="queryParams.promoterNickName"
+          placeholder="请输入达人名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        <el-input
+          v-model.number="queryParams.promoterId"
+          placeholder="请输入达人Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+
+      <el-table-column label="达人名称" align="center" prop="promoterNickName">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.promoterNickName }}
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="达人Id" align="center" prop="promoterId" />
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="发货数" align="center" prop="deliveryNum">
+      </el-table-column>
+      <el-table-column label="发货率" align="center" prop="deliveryRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum">
+      </el-table-column>
+      <el-table-column label="付款金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ (scope.row.payAmount / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate / 10 + "%" }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getItemDetail"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getOrderList,
+  getItemDetail,
+  downFilePost,
+} from "@/api/supplyChain/supplyChain";
+var echarts = require("echarts");
+export default {
+  name: "sale",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        promoterId: undefined,
+        promoterNickName: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+    };
+  },
+  created() {
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.getItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      //   this.getList();
+      //   this.initEchart('echart', this.handlerEchartOption(res.result, 'cost'))
+    });
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost("/isv/supply_chain/exportOrder", {
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        itemId: this.$route.query.id,
+      }).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `商品_${this.$route.query.name}${this.$route.query.orderStartDate}-${this.$route.query.orderEndDate}详情.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getItemDetail() {
+      this.loading = true;
+      getItemDetail({
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        itemId: this.$route.query.id,
+      }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getItemDetail();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      //   let date = new Date();
+      //   let y = date.getFullYear();
+      //   let MM = date.getMonth() + 1;
+      //   MM = MM < 10 ? "0" + MM : MM;
+      //   let dd = date.getDate();
+      //   dd = dd < 10 ? "0" + dd : dd;
+      //   this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 360 - 0
src/views/supplyChain/index.vue

@@ -0,0 +1,360 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          v-model="queryParams.promoterNickName"
+          placeholder="请输入达人名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        <el-input
+          v-model.number="queryParams.promoterId"
+          placeholder="请输入达人Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column
+        label="达人名称"
+        align="center"
+        prop="promoterNickName"
+        width="200"
+      >
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.promoterNickName }}({{ scope.row.promoterId }})
+          </a>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        label="达人Id"
+        align="center"
+        prop="promoterId"
+        width="200"
+      /> -->
+      <el-table-column
+        label="订单数"
+        align="center"
+        prop="orderNum"
+        width="100"
+      >
+      </el-table-column>
+      <el-table-column
+        label="有效订单数"
+        align="center"
+        prop="validOrderNUm"
+        width="100"
+      />
+      <el-table-column
+        label="有效率"
+        align="center"
+        prop="validRadio"
+        width="100"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="发货数"
+        align="center"
+        prop="deliveryNum"
+        width="100"
+      >
+      </el-table-column>
+      <el-table-column
+        label="发货率"
+        align="center"
+        prop="deliveryRadio"
+        width="100"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum"  width="100">
+      </el-table-column>
+      <el-table-column label="订单top3(订单数)" align="center" prop="topOrders">
+        <template slot-scope="scope">
+          <a
+            v-for="(item, index) in scope.row.topOrders"
+            :key="index"
+            @click="toDetail(item)"
+            style="text-align: left"
+          >
+            <img
+              :src="item.imageUrl"
+              alt=""
+              style="width: 50px; height: auto"
+            />
+            {{ item.itemTitle }}
+          </a>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import { getOrderList, downFilePost } from "@/api/supplyChain/supplyChain";
+export default {
+  name: "Index",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        promoterId: undefined,
+        promoterNickName: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getList();
+    });
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost(
+        "/isv/supply_chain/exportPromoterTotal",
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `达人订单列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 580 - 0
src/views/supplyChain/indexDetails.vue

@@ -0,0 +1,580 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterName">
+        {{ $route.query ? $route.query.name : "-" }}
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        {{ $route.query ? $route.query.id : "-" }}
+      </el-form-item>
+      <br />
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+
+      <el-table-column label="商品图片" align="center" prop="imageUrl">
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imageUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" align="center" prop="itemTitle">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.itemTitle }}
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品Id" align="center" prop="itemId" />
+      <el-table-column label="商品单价" align="center" prop="reservePrice">
+        <template slot-scope="scope">
+          {{ scope.row.reservePrice / 100 }}元
+        </template>
+      </el-table-column>
+
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column
+        label="有效率"
+        align="center"
+        prop="validRadio"
+        width="100"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="发货数"
+        align="center"
+        prop="deliveryNum"
+        width="100"
+      >
+      </el-table-column>
+      <el-table-column
+        label="发货率"
+        align="center"
+        prop="deliveryRadio"
+        width="100"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum" width="100">
+      </el-table-column>
+      <el-table-column label="付款金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ (scope.row.payAmount / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate / 10 + "%" }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getOrderDetail"
+    />
+
+    <div class="echart">
+      <div class="echartBody">
+        <h3 style="font-weight: bold">订单统计</h3>
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+          @change="getAllEchartsData"
+        ></el-date-picker>
+        <div id="echart" ref="echart" style="height: 500px; width: 100%"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getOrderList,
+  getOrderDetail,
+  getOrderStatistics,
+  downFilePost,
+} from "@/api/supplyChain/supplyChain";
+var echarts = require("echarts");
+export default {
+  name: "sale",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "今天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "昨天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+              end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    let start = new Date();
+    let end = new Date();
+
+    let y = end.getFullYear();
+    let MM = end.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = end.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+
+    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+    let sy = start.getFullYear();
+    let sMM = start.getMonth() + 1;
+    sMM = sMM < 10 ? "0" + sMM : sMM;
+    let sdd = start.getDate();
+    sdd = sdd < 10 ? "0" + sdd : sdd;
+    this.uploadDate = [`${sy}-${sMM}-${sdd}`, `${y}-${MM}-${dd}`];
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.getOrderDetail();
+      this.getOrderStatistics();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      //   this.getList();
+      //   this.initEchart('echart', this.handlerEchartOption(res.result, 'cost'))
+    });
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost("/isv/supply_chain/exportPromoter", {
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        promoterId: this.$route.query.id,
+      }).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `达人_${this.$route.query.name}${this.$route.query.orderStartDate}-${this.$route.query.orderEndDate}带货详情.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getOrderDetail() {
+      this.loading = true;
+      getOrderDetail({
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        promoterId: this.$route.query.id,
+      }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getAllEchartsData(e) {
+      console.log(e);
+      if (e.length == 2) {
+        this.getOrderStatistics();
+      }
+    },
+    getOrderStatistics() {
+      getOrderStatistics({
+        promoterId: this.$route.query.id,
+        orderStartDate: this.uploadDate[0],
+        orderEndDate: this.uploadDate[1],
+      }).then((response) => {
+        this.initEchart("echart", this.handlerEchartOption(response.data));
+      });
+    },
+    /** 获取echart的值 */
+    initEchart(idName, optionName) {
+      let that = this;
+      const chart = this.$refs[idName];
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName));
+        myChart.setOption(optionName);
+        window.addEventListener("resize", function () {
+          that.clientWidth = document.documentElement.clientWidth - 224;
+          myChart.resize();
+        });
+      }
+    },
+    /** echarts数据展示 订单统计*/
+    handlerEchartOption(data, typeShow) {
+      let option = {
+        noDataLoadingOption: {
+          text: "暂无数据",
+          effect: "bubble",
+          effectOption: {
+            effect: {
+              n: 0,
+            },
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          // formatter: function(params) {
+          // 	if(typeShow == 'play_duration_3s'){
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}%`
+          // 	}else{
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}`
+          // 	}
+
+          // },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        legend: {
+          icon: "circle",
+          top: "5%",
+          right: "5%",
+          itemWidth: 6,
+          itemGap: 20,
+          textStyle: {
+            color: "#556677",
+          },
+        },
+        xAxis: {
+          type: "category",
+          data: data.map((item) => {
+            return item.date;
+          }),
+          boundaryGap: false,
+          // 坐标轴线
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          // 分割线
+          splitLine: {
+            show: true,
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        yAxis: {
+          type: "value",
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          splitLine: {
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        series: [
+          {
+            smooth: true,
+            name: "订单统计",
+
+            type: "line",
+            stack: "总量",
+            data: data.map((item) => {
+              return item.orderNum;
+            }),
+            symbol: "circle",
+            symbolSize: 6,
+            lineStyle: {
+              normal: {
+                width: 2,
+              },
+            },
+            itemStyle: {
+              borderColor: "#ffffff",
+              borderWidth: 0,
+            },
+          },
+        ],
+      };
+      return option;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getOrderDetail();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      //   let date = new Date();
+      //   let y = date.getFullYear();
+      //   let MM = date.getMonth() + 1;
+      //   MM = MM < 10 ? "0" + MM : MM;
+      //   let dd = date.getDate();
+      //   dd = dd < 10 ? "0" + dd : dd;
+      //   this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 360 - 0
src/views/supplyChain/investment.vue

@@ -0,0 +1,360 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="人员名称" prop="userId">
+        <el-select
+          filterable
+          v-model="queryParams.userId"
+          placeholder="人员名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0'
+                    ? 'backgroundColor:green'
+                    : 'backgroundColor:red'
+                "
+                >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="供应链人员" align="center" prop="userName">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.userName }}({{ scope.row.userId }})
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品数" align="center" prop="itemCount" />
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="发货数" align="center" prop="deliveryNum">
+      </el-table-column>
+      <el-table-column label="发货率" align="center" prop="deliveryRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+            <el-table-column label="未发货数" align="center" prop="notDeliveryNum">
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{
+            scope.row.payAmount ? (scope.row.payAmount / 100).toFixed(2) : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+              ? (scope.row.regimentalPromotionAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+              ? (scope.row.totalRegimentalSettleAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getSupplyChainUserList,
+  getAdminReportList,
+  downFilePost,
+} from "@/api/supplyChain/supplyChain";
+export default {
+  name: "Investment",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {
+        personList: [],
+      },
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getPersonList();
+      this.getList();
+    });
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost(
+        "/isv/supply_chain/exportPromoterTotal",
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `达人订单列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/investmentDetails",
+        query: {
+          id: item.userId,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    getPersonList() {
+      getSupplyChainUserList().then((response) => {
+        this.queryParamsList.personList = response.rows;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getAdminReportList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 679 - 0
src/views/supplyChain/investmentDetails.vue

@@ -0,0 +1,679 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <!-- <el-table
+      v-loading="loadingTotal"
+      :data="itemSummary"
+      style="margin-bottom: 25px"
+      stripe
+    >
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="失效订单数"
+        align="center"
+        prop="invalidOrderNUm"
+      />
+      <el-table-column label="发货数" align="center" prop="deliveryNum">
+      </el-table-column>
+      <el-table-column label="发货率" align="center" prop="deliveryRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum">
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ (scope.row.payAmount / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+              ? (scope.row.regimentalPromotionAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+              ? (scope.row.totalRegimentalSettleAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table> -->
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      @sort-change="sortChange"
+      ref="multipleTable"
+      :span-method="arraySpanMethod"
+      border
+    >
+      <!-- :summary-method="getSummaries" -->
+      <!-- show-summary -->
+      <el-table-column
+        label="商品名称"
+        align="center"
+        prop="itemTitle"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.imageUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>
+                佣金率:
+                {{
+                  scope.row.itemCommissionRate
+                    ? scope.row.itemCommissionRate / 10 + "%"
+                    : "-"
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="认领人" align="center" prop="userName">
+      </el-table-column>
+      <el-table-column label="商品单价" align="center" prop="reservePrice">
+        <template slot-scope="scope">
+          <p
+            v-if="scope.row.reservePrice == '总计'"
+            style="font-size: 16px; text-align: center; font-weight: bold"
+          >
+            {{ scope.row.reservePrice }}
+          </p>
+          <span v-else> {{ scope.row.reservePrice / 100 }}元 </span>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="订单数"
+        align="center"
+        prop="orderNum"
+        sortable="custom"
+      >
+      </el-table-column>
+      <el-table-column
+        label="有效订单数"
+        align="center"
+        prop="validOrderNUm"
+        sortable="custom"
+      />
+      <el-table-column
+        label="有效率"
+        align="center"
+        prop="validRadio"
+        width="100"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="发货数"
+        align="center"
+        prop="deliveryNum"
+        width="100"
+        sortable="custom"
+      >
+      </el-table-column>
+      <el-table-column
+        label="发货率"
+        align="center"
+        prop="deliveryRadio"
+        width="100"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="未发货数"
+        align="center"
+        prop="notDeliveryNum"
+        width="100"
+        sortable="custom"
+      >
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{
+            !!scope.row.regimentalPromotionRate
+              ? scope.row.regimentalPromotionRate / 10 + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ (scope.row.payAmount / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+              ? (scope.row.regimentalPromotionAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+              ? (scope.row.totalRegimentalSettleAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getUserItemDetail"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getOrderList,
+  getItemDetail,
+  downFilePost,
+  getUserItemDetail,
+  getUserItemTotal,
+} from "@/api/supplyChain/supplyChain";
+var echarts = require("echarts");
+export default {
+  name: "ClaimOk",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      downLoadLoading: false,
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      prop: "orderNum",
+      sort: "desc",
+      itemSummary: [],
+      loadingTotal: false,
+    };
+  },
+  created() {
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.uploadDate = [
+        this.$route.query.orderStartDate,
+        this.$route.query.orderEndDate,
+      ];
+      this.getUserItemTotal();
+      this.getUserItemDetail();
+    } else {
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.getUserItemTotal();
+      this.getUserItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {});
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFilePost(
+        "/isv/supply_chain/exportUserItemDetail",
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        let blob = new Blob([res], {
+          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+        });
+        let downloadElement = document.createElement("a");
+        let href = window.URL.createObjectURL(blob); //创建下载的链接
+        downloadElement.href = href;
+        downloadElement.download = `认领列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (rowIndex === 0) {
+        if (columnIndex === 0) {
+          return [0, 0];
+        } else if (columnIndex === 1) {
+          return [0, 0];
+        } else if (columnIndex === 2) {
+          return [1, 3];
+        }
+      }
+    },
+    getUserItemTotal() {
+      this.loadingTotal = true;
+      getUserItemTotal(
+        this.addDateRange(
+          {
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        this.loadingTotal = false;
+        this.itemSummary = [res].map((item) => {
+          return {
+            ...item,
+            itemTitle: "总计",
+            userName: "总计",
+            reservePrice: "总计",
+          };
+        });
+      });
+    },
+    sortChange(col, prop, order) {
+      this.prop = col.prop;
+      this.sort = !!col.order
+        ? col.order == "descending"
+          ? "desc"
+          : "asc"
+        : "desc";
+      this.handleQuery();
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getUserItemDetail() {
+      this.loading = true;
+      getUserItemDetail(
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            fieId: this.prop,
+            sort: this.sort,
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = this.itemSummary.concat(response.rows);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getSummaries(param) {
+      console.log(param);
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总计";
+          return;
+        } else if (index == 1) {
+          sums[index] = "N/A";
+          return;
+        } else if (index == 9) {
+          sums[index] = "-";
+          return;
+        } else if (index == 2) {
+          sums[index] = "-";
+          return;
+        }
+
+        for (const key in this.itemSummary[0]) {
+          if (key == column.property) {
+            if (key == "validRadio" || key == "deliveryRadio") {
+              sums[index] = this.itemSummary[0][key]
+                ? (this.itemSummary[0][key] * 100).toFixed(2) + "%"
+                : "-";
+            } else if (
+              key == "payAmount" ||
+              key == "regimentalPromotionAmount" ||
+              key == "totalRegimentalSettleAmount"
+            ) {
+              sums[index] = this.itemSummary[0][key]
+                ? this.itemSummary[0][key] / 100
+                : "-";
+            } else {
+              sums[index] = this.itemSummary[0][key];
+            }
+          }
+        }
+
+        // const values = data.map((item) => Number(item[column.property]));
+        // console.log(values)
+        // if (!values.every((value) => isNaN(value))) {
+        //   sums[index] = values.reduce((prev, curr) => {
+        //     const value = Number(curr);
+        //     if (!isNaN(value)) {
+        //       return prev + curr;
+        //     } else {
+        //       return prev;
+        //     }
+        //   }, 0);
+        //   // sums[index] += " 元";
+        // } else {
+        //   sums[index] = "N/A";
+        // }
+      });
+
+      return sums;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getUserItemTotal();
+      this.getUserItemDetail();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      //   let date = new Date();
+      //   let y = date.getFullYear();
+      //   let MM = date.getMonth() + 1;
+      //   MM = MM < 10 ? "0" + MM : MM;
+      //   let dd = date.getDate();
+      //   dd = dd < 10 ? "0" + dd : dd;
+      if (
+        this.$route &&
+        this.$route.query.id &&
+        this.$route.query.orderStartDate &&
+        this.$route.query.orderEndDate
+      ) {
+        this.uploadDate = [
+          this.$route.query.orderStartDate,
+          this.$route.query.orderEndDate,
+        ];
+        this.getUserItemDetail();
+      } else {
+        let date = new Date();
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? "0" + MM : MM;
+        let dd = date.getDate();
+        dd = dd < 10 ? "0" + dd : dd;
+        this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+        this.getUserItemDetail();
+      }
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 370 - 0
src/views/supplyChain/service.vue

@@ -0,0 +1,370 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <!-- <el-table-column
+        label="商品图片"
+        align="center"
+        prop="imageUrl"
+        width="150"
+      >
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imageUrl"
+            alt=""
+            style="width: 100px; height: auto"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" align="center" prop="itemTitle">
+      </el-table-column> -->
+      <el-table-column
+        label="商品名称"
+        align="center"
+        prop="itemTitle"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.imageUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>
+                佣金率:
+                {{
+                  scope.row.itemCommissionRate
+                    ? scope.row.itemCommissionRate / 10 + "%"
+                    : "-"
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="商品Id" align="center" prop="itemId" /> -->
+      <el-table-column label="订单数" align="center" prop="orderNum">
+      </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column
+        label="失效订单数"
+        align="center"
+        prop="invalidOrderNUm"
+      />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.validRadio
+              ? (scope.row.validRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="发货数" align="center" prop="deliveryNum">
+      </el-table-column>
+      <el-table-column label="发货率" align="center" prop="deliveryRadio">
+        <template slot-scope="scope">
+          {{
+            scope.row.deliveryRadio
+              ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="未发货数" align="center" prop="notDeliveryNum">
+      </el-table-column>
+      <el-table-column
+        label="服务费率"
+        align="center"
+        prop="regimentalPromotionRate"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate / 10 + "%" }}
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ (scope.row.payAmount / 100).toFixed(2) }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+              ? (scope.row.regimentalPromotionAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+              ? (scope.row.totalRegimentalSettleAmount / 100).toFixed(2)
+              : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import { getItemServiceCharge } from "@/api/supplyChain/supplyChain";
+export default {
+  name: "Service",
+  dicts: ["sys_normal_disable"],
+  data() {
+    return {
+      dialogTableVisible: false,
+      logPage: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      logData: [],
+      logTotal: 0,
+      logLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 字典表格数据
+      typeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 分配销售
+      openAllocation: false,
+      // 选择的销售id
+      saleId: undefined,
+      // 获取用户id
+      userId: undefined,
+      // 销售列表
+      saleList: [],
+      // 分配销售确定loading
+      confirmLoadingSale: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let date = new Date();
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getList();
+    });
+  },
+  methods: {
+    toDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/goodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getItemServiceCharge(
+        this.addDateRange(
+          this.queryParams,
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.confirmLoading = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 3 - 3
src/views/system/user/index.vue

@@ -232,7 +232,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
-              <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
+              <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="100" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -288,7 +288,7 @@
                   :key="item.roleId"
                   :label="item.roleName"
                   :value="item.roleId"
-                  :disabled="item.status == 1"
+                  :disabled="item.status == 1||form.roleIds.length>=1"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -427,7 +427,7 @@ export default {
       rules: {
         userName: [
           { required: true, message: "用户名称不能为空", trigger: "blur" },
-          { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
+          { min: 2, max: 50, message: '用户名称长度必须介于 2 和 50 之间', trigger: 'blur' }
         ],
         nickName: [
           { required: true, message: "用户昵称不能为空", trigger: "blur" }