Browse Source

Merge branch 'develop_yh04' of jianguan-web/qpls-md-html into pre-release

李磊 3 năm trước cách đây
mục cha
commit
d2b1a48bf5
63 tập tin đã thay đổi với 1952 bổ sung913 xóa
  1. 144 22
      package-lock.json
  2. 1 0
      package.json
  3. 1 1
      public/version.json
  4. 18 0
      src/api/checkWarehouse.js
  5. 7 5
      src/api/data.js
  6. 2 2
      src/components/MultiTab/MultiTab.vue
  7. 1 2
      src/components/NoticeIcon/NoticeIcon.vue
  8. 37 2
      src/components/global.less
  9. 47 4
      src/components/tools/UserMenu.vue
  10. 15 15
      src/config/router.config.js
  11. 9 6
      src/layouts/BasicLayout.vue
  12. 2 2
      src/libs/JGPrint.js
  13. 1 0
      src/store/getters.js
  14. 14 3
      src/store/modules/app.js
  15. 1 0
      src/store/mutation-types.js
  16. 11 0
      src/utils/mixin.js
  17. 233 76
      src/views/Home.vue
  18. 14 11
      src/views/allocationManagement/chainTransferOut/edit.vue
  19. 41 24
      src/views/allocationManagement/chainTransferOut/list.vue
  20. 1 1
      src/views/allocationManagement/storeTransferOut/edit.vue
  21. 40 22
      src/views/allocationManagement/storeTransferOut/list.vue
  22. 20 13
      src/views/allocationManagement/warehouseAllocation/edit.vue
  23. 44 24
      src/views/allocationManagement/warehouseAllocation/list.vue
  24. 26 4
      src/views/bulkManagement/bulkImport/list.vue
  25. 24 19
      src/views/bulkManagement/bulkReturnGoods/edit.vue
  26. 24 19
      src/views/bulkManagement/bulkReturnGoods/grabEdit.vue
  27. 41 24
      src/views/bulkManagement/bulkReturnGoods/list.vue
  28. 89 43
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  29. 41 24
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  30. 2 2
      src/views/common/commonModal.vue
  31. 138 0
      src/views/common/pdfViewModal.vue
  32. 1 1
      src/views/common/productBrand.js
  33. 23 7
      src/views/common/productType.js
  34. 2 2
      src/views/common/settleStyle.js
  35. 33 13
      src/views/financialManagement/financialCollection/list.vue
  36. 33 13
      src/views/financialManagement/financialPayment/list.vue
  37. 26 3
      src/views/financialManagement/inventoryCheckAudit/list.vue
  38. 137 0
      src/views/financialManagement/inventoryCheckAudit/setPriceModal.vue
  39. 18 12
      src/views/financialManagement/warehousingAudit/list.vue
  40. 5 4
      src/views/inventoryManagement/inventoryChecking/selfDisk.vue
  41. 25 1
      src/views/inventoryManagement/inventoryImport/list.vue
  42. 6 3
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  43. 4 9
      src/views/inventoryManagement/inventoryQuery/list.vue
  44. 30 6
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  45. 1 1
      src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue
  46. 17 12
      src/views/outboundOrderManagement/outboundOrder/list.vue
  47. 206 174
      src/views/productManagement/productInfo/list.vue
  48. 5 46
      src/views/productManagement/productInfoJg/list.vue
  49. 34 14
      src/views/purchasingManagement/purchaseOrder/edit.vue
  50. 41 26
      src/views/purchasingManagement/purchaseOrder/list.vue
  51. 1 0
      src/views/purchasingManagement/purchaseReturn/edit.vue
  52. 42 24
      src/views/purchasingManagement/purchaseReturn/list.vue
  53. 6 5
      src/views/purchasingManagement/purchaseReturnOutSync/edit.vue
  54. 4 4
      src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue
  55. 45 29
      src/views/purchasingManagement/purchaseReturnOutSync/list.vue
  56. 10 7
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  57. 7 1
      src/views/salesManagement/salesQuery/edit.vue
  58. 43 33
      src/views/salesManagement/salesQuery/list.vue
  59. 7 63
      src/views/salesManagement/salesQuery/queryPart.vue
  60. 47 27
      src/views/salesManagement/salesReturn/list.vue
  61. 2 2
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  62. 1 0
      src/views/user/Login.vue
  63. 1 1
      vue.config.js

+ 144 - 22
package-lock.json

@@ -1245,8 +1245,7 @@
     "@types/json-schema": {
       "version": "7.0.11",
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
-      "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
-      "dev": true
+      "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
     },
     "@types/loader-utils": {
       "version": "1.1.3",
@@ -2432,7 +2431,6 @@
       "version": "6.10.2",
       "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz",
       "integrity": "sha1-086gTWsBeyiUrWkED+yLYj60vVI=",
-      "dev": true,
       "requires": {
         "fast-deep-equal": "^2.0.1",
         "fast-json-stable-stringify": "^2.0.0",
@@ -2449,8 +2447,7 @@
     "ajv-keywords": {
       "version": "3.4.1",
       "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.4.1.tgz",
-      "integrity": "sha1-75FuJxxkrBIXH9g4TqrmsjRYVNo=",
-      "dev": true
+      "integrity": "sha1-75FuJxxkrBIXH9g4TqrmsjRYVNo="
     },
     "alphanum-sort": {
       "version": "1.0.2",
@@ -3033,6 +3030,11 @@
         "resolve": "^1.4.0"
       }
     },
+    "babel-plugin-syntax-dynamic-import": {
+      "version": "6.18.0",
+      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",
+      "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo="
+    },
     "babel-plugin-syntax-object-rest-spread": {
       "version": "6.13.0",
       "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
@@ -3360,8 +3362,7 @@
     "big.js": {
       "version": "5.2.2",
       "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
-      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
-      "dev": true
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
     },
     "binary-extensions": {
       "version": "1.13.1",
@@ -5841,8 +5842,7 @@
     "emojis-list": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
-      "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
-      "dev": true
+      "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k="
     },
     "encodeurl": {
       "version": "1.0.2",
@@ -7041,8 +7041,7 @@
     "fast-deep-equal": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
-      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
-      "dev": true
+      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
     },
     "fast-diff": {
       "version": "1.1.2",
@@ -7066,8 +7065,7 @@
     "fast-json-stable-stringify": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
-      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
-      "dev": true
+      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
     },
     "fast-levenshtein": {
       "version": "2.0.6",
@@ -10628,8 +10626,7 @@
     "json-schema-traverse": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
-      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
-      "dev": true
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
     },
     "json-stable-stringify-without-jsonify": {
       "version": "1.0.1",
@@ -10937,7 +10934,6 @@
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
       "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
-      "dev": true,
       "requires": {
         "big.js": "^5.2.2",
         "emojis-list": "^2.0.0",
@@ -10948,7 +10944,6 @@
           "version": "1.0.1",
           "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
           "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
-          "dev": true,
           "requires": {
             "minimist": "^1.2.0"
           }
@@ -11403,8 +11398,7 @@
     "minimist": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
-      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
-      "dev": true
+      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
     },
     "minipass": {
       "version": "3.1.6",
@@ -12530,6 +12524,11 @@
         "sha.js": "^2.4.8"
       }
     },
+    "pdfjs-dist": {
+      "version": "2.6.347",
+      "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.6.347.tgz",
+      "integrity": "sha512-QC+h7hG2su9v/nU1wEI3SnpPIrqJODL7GTDFvR74ANKGq1AFJW16PH8VWnhpiTi9YcLSFV9xLeWSgq+ckHLdVQ=="
+    },
     "performance-now": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@@ -13544,8 +13543,7 @@
     "punycode": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
-      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
-      "dev": true
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
     },
     "q": {
       "version": "1.5.1",
@@ -13680,6 +13678,68 @@
         "unpipe": "1.0.0"
       }
     },
+    "raw-loader": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
+      "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
+      "requires": {
+        "loader-utils": "^2.0.0",
+        "schema-utils": "^3.0.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "6.12.6",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+          "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+          "requires": {
+            "fast-deep-equal": "^3.1.1",
+            "fast-json-stable-stringify": "^2.0.0",
+            "json-schema-traverse": "^0.4.1",
+            "uri-js": "^4.2.2"
+          }
+        },
+        "ajv-keywords": {
+          "version": "3.5.2",
+          "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+          "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ=="
+        },
+        "emojis-list": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+          "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
+        },
+        "fast-deep-equal": {
+          "version": "3.1.3",
+          "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+          "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+        },
+        "json5": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
+          "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
+        },
+        "loader-utils": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "schema-utils": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+          "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
+          "requires": {
+            "@types/json-schema": "^7.0.8",
+            "ajv": "^6.12.5",
+            "ajv-keywords": "^3.5.2"
+          }
+        }
+      }
+    },
     "read-pkg": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
@@ -16226,7 +16286,6 @@
       "version": "4.2.2",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
       "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
-      "dev": true,
       "requires": {
         "punycode": "^2.1.0"
       }
@@ -16618,6 +16677,44 @@
       "resolved": "https://registry.npm.taobao.org/vue-ls/download/vue-ls-3.2.1.tgz",
       "integrity": "sha1-JdHHWzpRwXAYEp3mB7RLsSCjOFo="
     },
+    "vue-pdf": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/vue-pdf/-/vue-pdf-4.3.0.tgz",
+      "integrity": "sha512-zd3lJj6CbtrawgaaDDciTDjkJMUKiLWtbEmBg5CvFn9Noe9oAO/GNy/fc5c59qGuFCJ14ibIV1baw4S07e5bSQ==",
+      "requires": {
+        "babel-plugin-syntax-dynamic-import": "^6.18.0",
+        "loader-utils": "^1.4.0",
+        "pdfjs-dist": "2.6.347",
+        "raw-loader": "^4.0.2",
+        "vue-resize-sensor": "^2.0.0",
+        "worker-loader": "^2.0.0"
+      },
+      "dependencies": {
+        "emojis-list": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+          "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
+        },
+        "json5": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+          "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+          "requires": {
+            "minimist": "^1.2.0"
+          }
+        },
+        "loader-utils": {
+          "version": "1.4.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
+          "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^1.0.1"
+          }
+        }
+      }
+    },
     "vue-qr": {
       "version": "3.2.4",
       "resolved": "https://registry.npmjs.org/vue-qr/-/vue-qr-3.2.4.tgz",
@@ -16641,6 +16738,11 @@
       "resolved": "https://registry.npmjs.org/vue-ref/-/vue-ref-2.0.0.tgz",
       "integrity": "sha512-uKNKpFOVeWNqS2mrBZqnpLyXJo5Q+vnkex6JvpENvhXHFNBW/SJTP8vJywLuVT3DpxwXcF9N0dyIiZ4/NpTexQ=="
     },
+    "vue-resize-sensor": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz",
+      "integrity": "sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ=="
+    },
     "vue-router": {
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz",
@@ -17357,6 +17459,26 @@
         "errno": "~0.1.7"
       }
     },
+    "worker-loader": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz",
+      "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==",
+      "requires": {
+        "loader-utils": "^1.0.0",
+        "schema-utils": "^0.4.0"
+      },
+      "dependencies": {
+        "schema-utils": {
+          "version": "0.4.7",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
+          "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
+          "requires": {
+            "ajv": "^6.1.0",
+            "ajv-keywords": "^3.1.0"
+          }
+        }
+      }
+    },
     "wrap-ansi": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",

+ 1 - 0
package.json

@@ -34,6 +34,7 @@
     "vue-cookies": "^1.6.1",
     "vue-cropper": "0.4.9",
     "vue-ls": "^3.2.1",
+    "vue-pdf": "^4.3.0",
     "vue-qr": "^3.2.2",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.1.2",

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "1.1.2",
+    "version": "1.1.5",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 18 - 0
src/api/checkWarehouse.js

@@ -19,6 +19,24 @@ export const checkWarehouseSave = (params) => {
     method: 'post'
   })
 }
+
+// 查询没有成本价的产品
+export const queryStockProductCostNull = (params) => {
+  return axios({
+    url: '/checkWarehouse/queryStockProductCostNull',
+    data: params,
+    method: 'post'
+  })
+}
+// 设置成本价
+export const stockWarnSaveBatch = (params) => {
+  return axios({
+    url: '/stockWarn/saveBatch',
+    data: params,
+    method: 'post'
+  })
+}
+
 //  库存盘点  校验是否有未完结的盘点单
 export const checkWarehouseValidate = (params) => {
   return axios({

+ 7 - 5
src/api/data.js

@@ -106,11 +106,13 @@ function randomStr (len) {
 
 // 查询省/市/区
 export const getArea = (params) => {
-  return axios({
-    url: `/area/queryList`,
-    data: params,
-    method: 'post'
-  })
+  if(params.type == '2' || params.parentId){
+    return axios({
+      url: `/area/queryList`,
+      data: params,
+      method: 'post'
+    })
+  }
 }
 
 // 首页 导航指引合计

+ 2 - 2
src/components/MultiTab/MultiTab.vue

@@ -1,6 +1,5 @@
 <script>
 import events from './events'
-
 export default {
   name: 'MultiTab',
   data () {
@@ -13,7 +12,7 @@ export default {
       maxTabNums: 10
     }
   },
-  inject: ['reloadView'],
+  inject: ['reloadView', 'setIsHomeNav'],
   created () {
     // bind event
     events.$on('open', val => {
@@ -66,6 +65,7 @@ export default {
         this.selectedLastPath()
       }
       this.$store.state.app.closeTabPages.push(targetKey)
+      this.setIsHomeNav(targetKey, null)
     },
     selectedLastPath () {
       this.activeKey = this.tabsList[this.tabsList.length - 1]

+ 1 - 2
src/components/NoticeIcon/NoticeIcon.vue

@@ -48,7 +48,7 @@
   </a-popover> -->
   <span @click="fetchNotice" class="header-notice" ref="noticeRef">
     <a-badge :count="unreadCount">
-      <a-icon style="font-size: 16px; padding: 0 5px" type="bell" />
+      <a-icon style="font-size: 16px; padding: 0 5px 0 0" type="bell" />
       <span>公告</span>
     </a-badge>
   </span>
@@ -126,7 +126,6 @@ export default {
   .header-notice{
     display: inline-block;
     transition: all 0.3s;
-    margin: 0 10px;
     span {
       vertical-align: initial;
     }

+ 37 - 2
src/components/global.less

@@ -1,19 +1,54 @@
 @import './index.less';
 
 body {
-
   &.colorWeak {
     filter: invert(80%);
   }
   &.userLayout {
     overflow: auto;
   }
+  &.small{
+    .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
+    .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
+    .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
+    .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
+    .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title, 
+    .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
+    .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
+    .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-cascader-picker{
+      font-size: 12px!important;
+    }
+  }
+  &.middle{
+    .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
+    .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
+    .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
+    .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
+    .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title, 
+    .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
+    .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
+    .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-modal-close-x,.ant-cascader-picker{
+      font-size: 14px!important;
+    }
+  }
+  &.large{
+    .ant-form,.ant-form label,.ant-form-item,.ant-card,.ant-table,.ant-btn-sm,.ant-btn,.ant-btn-primary.button-error,
+    .ant-alert,.ant-collapse,.ant-descriptions-item-label,.ant-descriptions-item-content,.ant-checkbox-wrapper,.ant-radio-wrapper,
+    .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-input, .table-page-search-wrapper .ant-form.ant-form-inline .ant-form-item .ant-select-selection,
+    .ant-cascader-menus,.ant-select-dropdown,.ant-select-dropdown-menu-item,.ant-collapse,.ant-page-header-heading-sub-title,.ant-input-affix-wrapper,.ant-input,.ant-select,
+    .ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title, 
+    .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title,.ant-tabs-nav-container,
+    .ant-badge,.layout.ant-layout .header .user-wrapper .action, .layout.ant-layout .top-nav-header-index .user-wrapper .action,.ant-dropdown,.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title,
+    .content-box,.ant-modal-body,.ant-modal-confirm-body .ant-modal-confirm-title,.ant-modal-confirm-body .ant-modal-confirm-content,.ant-modal-title,.ant-modal-close-x,.ant-cascader-picker{
+      font-size: 16px!important;
+    }
+  }
 }
 
 .layout.ant-layout {
   height: auto;
   overflow-x: hidden;
-
+  
   &.mobile,
   &.tablet {
     .ant-layout-content {

+ 47 - 4
src/components/tools/UserMenu.vue

@@ -5,7 +5,42 @@
         <img style="width: 22px;height: 22px;vertical-align: middle;margin: 0 5px;" src="../../assets/icon_movie.png"/>
         <span style="vertical-align: middle;">帮助</span>
       </p>
+      <!-- 通知 -->
       <notice-icon class="action"/>
+      <!-- 皮肤设置 -->
+      <!-- <a-popover trigger="click">
+        <div slot="content" :style="{width: fontSize=='small'?'200px':'250px'}">
+          <a-form-model :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+            <a-form-model-item label="主题">
+              <a-radio-group :value="theme" @change="changeTheme">
+                <a-radio-button value="dark">
+                  深色
+                </a-radio-button>
+                <a-radio-button value="light">
+                  浅色
+                </a-radio-button>
+              </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item label="字体大小">
+              <a-radio-group :value="fontSize" @change="changeFontSize">
+                <a-radio-button value="small">
+                  小
+                </a-radio-button>
+                <a-radio-button value="middle">
+                  中
+                </a-radio-button>
+                <a-radio-button value="large">
+                  大
+                </a-radio-button>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+        <span class="skin">
+          <a-icon style="font-size: 15px; padding: 0 3px 0 0" type="skin" />
+          设置
+        </span>
+      </a-popover> -->
       <a-dropdown>
         <span class="action ant-dropdown-link user-dropdown-menu">
           <!-- <a-avatar class="avatar" size="small" :src="avatar==''?defaultAvatar:avatar"/> -->
@@ -51,7 +86,7 @@ export default {
     NoticeIcon
   },
   computed: {
-    ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo', 'nowRoute']),
+    ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo', 'nowRoute', 'theme', 'fontSize']),
     authOrgsList () { //  过滤掉当前登录账户(不可由自己切换为自己)
       const _this = this
       const arr = []
@@ -137,20 +172,28 @@ export default {
         description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
         duration: 4
       })
+    },
+    // 切换主题
+    changeTheme (e) {
+      this.$store.dispatch('ToggleTheme', e.target.value)
+    },
+    // 切换字体大小
+    changeFontSize (e) {
+      this.$store.dispatch('ToggleFontSize', e.target.value)
     }
   }
 }
 </script>
 <style scoped="scoped">
-.help-cont{
+.help-cont,.skin{
 	display: inline-block;
 	cursor: pointer;
 	transition: all 0.3s;
-	padding: 0 5px;
+	padding: 0 12px;
   margin: 0;
   vertical-align: bottom;
 }
-.help-cont:hover {
+.help-cont:hover, .skin:hover {
 	background-color: rgba(0, 0, 0, 0.04);
 }
 </style>

+ 15 - 15
src/config/router.config.js

@@ -593,7 +593,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '采购管理',
-          icon: 'money-collect',
+          icon: 'file-done',
           permission: 'M_purchasingManagement'
         },
         children: [
@@ -604,7 +604,7 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '采购单管理',
-              icon: 'money-collect',
+              icon: 'file-done',
               permission: 'M_purchasingList'
             },
             hideChildrenInMenu: true,
@@ -615,7 +615,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/list.vue'),
                 meta: {
                   title: '采购单列表',
-                  icon: 'money-collect',
+                  icon: 'file-done',
                   hidden: true,
                   permission: 'M_purchasingList'
                 }
@@ -626,7 +626,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
                 meta: {
                   title: '新增采购单',
-                  icon: 'money-collect',
+                  icon: 'file-done',
                   hidden: true,
                   permission: 'B_purchaseNew'
                 }
@@ -637,7 +637,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
                 meta: {
                   title: '编辑采购单',
-                  icon: 'money-collect',
+                  icon: 'file-done',
                   hidden: true,
                   permission: 'B_purchaseEdit'
                 }
@@ -648,7 +648,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/detail.vue'),
                 meta: {
                   title: '采购单详情',
-                  icon: 'money-collect',
+                  icon: 'file-done',
                   hidden: true,
                   replaceTab: true,
                   permission: 'B_purchaseDetail'
@@ -660,7 +660,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
                 meta: {
                   title: '采购入库',
-                  icon: 'money-collect',
+                  icon: 'file-done',
                   hidden: true,
                   replaceTab: true,
                   permission: 'B_purchaseReceiving'
@@ -846,7 +846,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '出库管理',
-          icon: 'logout',
+          icon: 'export',
           permission: 'M_outboundList'
         },
         children: [
@@ -857,7 +857,7 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '出库',
-              icon: 'logout',
+              icon: 'export',
               permission: 'M_outboundList'
             },
             hideChildrenInMenu: true,
@@ -868,7 +868,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "outboundOrderManagement" */ '@/views/outboundOrderManagement/outboundOrder/list.vue'),
                 meta: {
                   title: '出库列表',
-                  icon: 'logout',
+                  icon: 'export',
                   hidden: true,
                   permission: 'M_outboundList'
                 }
@@ -2591,7 +2591,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '供应商管理',
-          icon: 'team',
+          icon: 'contacts',
           permission: 'M_supplierInfoList'
         },
         children: [
@@ -2602,7 +2602,7 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '供应商管理',
-              icon: 'team',
+              icon: 'contacts',
               permission: 'M_supplierInfoList'
             },
             hideChildrenInMenu: true,
@@ -2613,7 +2613,7 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "productManagement" */ '@/views/supplierManagement/supplierInfo/list.vue'),
                 meta: {
                   title: '供应商列表',
-                  icon: 'team',
+                  icon: 'contacts',
                   hidden: true,
                   permission: 'M_supplierInfoList'
                 }
@@ -2692,7 +2692,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '基础设置',
-          icon: 'pushpin',
+          icon: 'setting',
           permission: 'M_basicData'
         },
         children: [
@@ -2830,7 +2830,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '权限管理',
-          icon: 'lock',
+          icon: 'key',
           permission: 'M_powerMD_0'
         },
         children: [

+ 9 - 6
src/layouts/BasicLayout.vue

@@ -80,7 +80,7 @@
 import moment from 'moment'
 import { triggerWindowResizeEvent } from '@/utils/util'
 import { mapState, mapActions, mapGetters } from 'vuex'
-import { mixin, mixinDevice } from '@/utils/mixin'
+import { mixin, mixinDevice, commonMixin } from '@/utils/mixin'
 import config from '@/config/defaultSettings'
 
 import RouteView from './RouteView'
@@ -92,10 +92,11 @@ import { asyncRouterMap } from '@/config/router.config'
 import store from '@/store'
 export default {
   name: 'BasicLayout',
-  mixins: [mixin, mixinDevice],
+  mixins: [mixin, mixinDevice, commonMixin],
   provide () {
     return {
-      reloadView: this.reloadView
+      reloadView: this.reloadView,
+      setIsHomeNav: this.setIsHomeNav
     }
   },
   components: {
@@ -178,8 +179,7 @@ export default {
       if (isPurchaseReturn) {
         playerOptions.sources[0].src = 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/helpvideo/4caigoutuihuo.mp4'
       }
-	  // console.log(playerOptions, 'playerOptions')
-	  return playerOptions
+	    return playerOptions
     }
   },
   watch: {
@@ -195,10 +195,13 @@ export default {
       const noqx = asyncRouterMap.find((item) => item.path === '/').children
       this.menus = [noqx.find(item => item.path === '/home')]
     }
+    // 重置主题,字体,布局
     this.collapsed = !this.sidebarOpened
     this.$store.dispatch('ToggleMultiTab', true)
 	  this.$store.dispatch('ToggleColor', '#2A86F4')
-    this.$store.dispatch('ToggleTheme', 'dark')
+    console.log(localStorage.getItem('DEFAULT_THEME'), localStorage.getItem('DEFAULT_FONT_SIZE'))
+    this.$store.dispatch('ToggleTheme', localStorage.getItem('DEFAULT_THEME'))
+    this.$store.dispatch('ToggleFontSize', localStorage.getItem('DEFAULT_FONT_SIZE'))
     // 判断是否是当月25日后
     this.$store.state.app.isLastDayForMonth = moment().date() >= 25
     if (this.$store.state.app.isLastDayForMonth && this.$hasPermissions('M_mothEndTips')) {

+ 2 - 2
src/libs/JGPrint.js

@@ -32,7 +32,7 @@ export const JGPrintTag = function (html, width, height, data) {
   // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel",'H')
   LODOP.SET_PRINT_COPIES(data.printQty)// 指定份数
   LODOP.SET_PRINT_PAGESIZE(1, width, height)
-  LODOP.PRINT()
+  LODOP.PRINTA()
 }
  
 export const demoGetBASE64 = function (dataArray) {
@@ -168,7 +168,7 @@ export const jGPrint = function (data, type, printerType) {
         LODOP.PRINT_INIT("")
         LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[i])
         LODOP.SET_PRINT_PAGESIZE(3, 2090, 40, '')
-        LODOP.PRINT()
+        LODOP.PRINTA()
       }
     }
     

+ 1 - 0
src/store/getters.js

@@ -1,6 +1,7 @@
 const getters = {
   device: state => state.app.device,
   theme: state => state.app.theme,
+  fontSize: state => state.app.fontSize,
   color: state => state.app.color,
   token: state => state.user.token,
   avatar: state => state.user.avatar,

+ 14 - 3
src/store/modules/app.js

@@ -9,7 +9,8 @@ import {
   DEFAULT_FIXED_SIDEMENU,
   DEFAULT_FIXED_HEADER_HIDDEN,
   DEFAULT_CONTENT_WIDTH_TYPE,
-  DEFAULT_MULTI_TAB
+  DEFAULT_MULTI_TAB,
+  DEFAULT_FONT_SIZE
 } from '@/store/mutation-types'
 
 const app = {
@@ -17,6 +18,7 @@ const app = {
     sidebar: true,
     device: 'desktop',
     theme: '',
+    fontSize:'small',
     layout: '',
     contentWidth: '',
     fixedHeader: false,
@@ -33,7 +35,6 @@ const app = {
     updateList: false,
     loadingStatus: false,
     winHeight: 0 ,//  窗口高度
-    isHomeNav: false ,// 是否从首页流程导航打开的页面
     isLastDayForMonth: false, // 是否是当月最后一天
   },
   mutations: {
@@ -49,10 +50,15 @@ const app = {
       state.device = device
     },
     TOGGLE_THEME: (state, theme) => {
-      // setStore('_DEFAULT_THEME', theme)
       Vue.ls.set(DEFAULT_THEME, theme)
+      localStorage.setItem(DEFAULT_THEME,theme)
       state.theme = theme
     },
+    TOGGLE_FONTSIZE:(state, size) => {
+      localStorage.setItem(DEFAULT_FONT_SIZE,size)
+      state.fontSize = size
+      document.body.className = size
+    },
     TOGGLE_LAYOUT_MODE: (state, layout) => {
       Vue.ls.set(DEFAULT_LAYOUT_MODE, layout)
       state.layout = layout
@@ -121,6 +127,11 @@ const app = {
     }, theme) {
       commit('TOGGLE_THEME', theme)
     },
+    ToggleFontSize({
+      commit
+    }, size) {
+      commit('TOGGLE_FONTSIZE', size)
+    },
     ToggleLayoutMode ({
       commit
     }, mode) {

+ 1 - 0
src/store/mutation-types.js

@@ -9,6 +9,7 @@ export const DEFAULT_FIXED_SIDEMENU = 'DEFAULT_FIXED_SIDEMENU'
 export const DEFAULT_FIXED_HEADER_HIDDEN = 'DEFAULT_FIXED_HEADER_HIDDEN'
 export const DEFAULT_CONTENT_WIDTH_TYPE = 'DEFAULT_CONTENT_WIDTH_TYPE'
 export const DEFAULT_MULTI_TAB = 'DEFAULT_MULTI_TAB'
+export const DEFAULT_FONT_SIZE = 'DEFAULT_FONT_SIZE'
 
 export const CONTENT_WIDTH_TYPE = {
   Fluid: 'Fluid',

+ 11 - 0
src/utils/mixin.js

@@ -10,6 +10,7 @@ const mixin = {
     ...mapState({
       layoutMode: state => state.app.layout,
       navTheme: state => state.app.theme,
+      fontSize: state => state.app.fontSize,
       primaryColor: state => state.app.color,
       colorWeak: state => state.app.weak,
       fixedHeader: state => state.app.fixedHeader,
@@ -89,6 +90,16 @@ const commonMixin = {
     }
   },
   methods: {
+    getIsHomeNav () {
+      const data = sessionStorage.getItem('isHomeNav')
+      return JSON.parse(data) || {}
+    },
+    // 设置this.isHomeNav
+    setIsHomeNav(name,params){
+      const data = this.getIsHomeNav()
+      data[name] = params
+      sessionStorage.setItem('isHomeNav', JSON.stringify(data))
+    },
     // 清除组件缓存
     clearCompCache (cache, keys, key) {
       if (cache[key] && cache[key].componentInstance) {

+ 233 - 76
src/views/Home.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="home">
+  <div class="home" :class="[fontSize]">
     <!-- <a-alert :message="message" type="info" /> -->
     <a-card size="small" :bordered="false" class="page-cont" :bodyStyle="{padding: '17px 30px 20px'}">
       <h3 class="page-tit">客户信息</h3>
@@ -11,8 +11,42 @@
       </ul>
     </a-card>
     <!-- 数据看板 -->
-    <a-card v-if="$hasPermissions('M_homePage_data')" size="small" :bordered="false" class="page-cont" :bodyStyle="{padding: '0px'}">
-      <a-row>
+    <a-card
+      v-if="$hasPermissions('M_homePage_data')"
+      size="small"
+      :bordered="false"
+      class="page-cont"
+      :bodyStyle="{padding: '17px 30px 0'}">
+      <div style="font-size:16px;font-weight: 500;">
+        <span>数据概览</span>
+        <span
+          :title="!hiddenBizData?'隐藏':'显示'"
+          @click="hiddenBizData=!hiddenBizData"
+          style="margin-left: 10px;cursor: pointer;"
+        >
+          <svg
+            v-if="hiddenBizData"
+            t="1650362667217"
+            class="icon"
+            viewBox="0 0 1024 1024"
+            version="1.1"
+            xmlns="http://www.w3.org/2000/svg"
+            p-id="18432"
+            width="16"
+            height="16"><path d="M469.333333 681.386667c-36.053333-2.432-71.253333-8.533333-104.96-17.92l-69.802666 149.674666a42.368 42.368 0 0 1-56.533334 20.266667 42.666667 42.666667 0 0 1-20.821333-56.32l66.986667-143.658667a451.712 451.712 0 0 1-148.906667-112.682666 388.693333 388.693333 0 0 1-70.570667-119.338667 42.666667 42.666667 0 1 1 80.128-29.354667 303.445333 303.445333 0 0 0 55.210667 93.098667C270.634667 547.413333 383.018667 597.333333 505.728 597.333333c122.752 0 235.136-49.962667 305.706667-132.181333a303.445333 303.445333 0 0 0 55.210666-93.098667 42.666667 42.666667 0 0 1 80.128 29.354667 388.693333 388.693333 0 0 1-70.570666 119.338667 423.68 423.68 0 0 1-18.773334 20.48l104.362667 104.362666a42.666667 42.666667 0 0 1-0.298667 60.032 42.368 42.368 0 0 1-60.032 0.298667l-109.653333-109.653333c-20.48 14.08-42.24 26.581333-65.024 37.418666l66.901333 143.36a42.666667 42.666667 0 0 1-20.821333 56.362667 42.368 42.368 0 0 1-56.533333-20.266667l-69.717334-149.546666a520.533333 520.533333 0 0 1-91.946666 16.810666v130.645334A42.666667 42.666667 0 0 1 512 853.333333c-23.722667 0-42.666667-18.944-42.666667-42.24v-129.706666z" fill="#8a8a8a" p-id="18433"></path><path d="M176.128 524.373333a42.368 42.368 0 0 1 60.032 0.256 42.666667 42.666667 0 0 1 0.298667 60.074667l-121.216 121.216a42.368 42.368 0 0 1-60.074667-0.298667 42.666667 42.666667 0 0 1-0.298667-60.032l121.258667-121.258666z" fill="#8a8a8a" p-id="18434"></path></svg>
+          <svg
+            v-else
+            t="1650362825006"
+            class="icon"
+            viewBox="0 0 1024 1024"
+            version="1.1"
+            xmlns="http://www.w3.org/2000/svg"
+            p-id="21815"
+            width="16"
+            height="16"><path d="M512 209.403241c-201.731514 0-374.009206 125.476783-443.808922 302.596759 69.798692 177.119977 242.077408 302.596759 443.808922 302.596759 201.933105 0 374.010229-125.476783 443.808922-302.596759C886.009206 334.880023 713.933105 209.403241 512 209.403241zM512 713.731514c-111.355157 0-201.731514-90.375334-201.731514-201.731514s90.375334-201.731514 201.731514-201.731514 201.731514 90.375334 201.731514 201.731514S623.355157 713.731514 512 713.731514zM512 390.961296c-66.772776 0-121.038704 54.265928-121.038704 121.038704s54.265928 121.038704 121.038704 121.038704 121.038704-54.265928 121.038704-121.038704S578.772776 390.961296 512 390.961296z" p-id="21816" fill="#8a8a8a"></path></svg>
+        </span>
+      </div>
+      <a-row v-if="!hiddenBizData">
         <a-col :span="6">
           <div class="page-data-module">
             <div class="page-data-con">
@@ -109,6 +143,91 @@
           </div>
         </a-col>
       </a-row>
+      <a-row v-else>
+        <a-col :span="6">
+          <div class="page-data-module">
+            <div class="page-data-con">
+              <p class="page-data-tit">今日总单量(个)/总销售金额(元)</p>
+              <h3 class="page-data-num main-color">
+                ****
+              </h3>
+              <p class="page-data-item">
+                <span class="page-data-itemText">本周</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+              <p class="page-data-item">
+                <span class="page-data-itemText">本月</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+            </div>
+            <span class="page-data-line"></span>
+          </div>
+        </a-col>
+        <a-col :span="6">
+          <div class="page-data-module">
+            <div class="page-data-con">
+              <p class="page-data-tit">今日总采购单量(个)/总采购金额(元)</p>
+              <h3 class="page-data-num">
+                ****
+              </h3>
+              <p class="page-data-item">
+                <span class="page-data-itemText">本周</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+              <p class="page-data-item">
+                <span class="page-data-itemText">本月</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+            </div>
+            <span class="page-data-line"></span>
+          </div>
+        </a-col>
+        <a-col :span="6">
+          <div class="page-data-module">
+            <div class="page-data-con">
+              <p class="page-data-tit">客户总数(个)</p>
+              <h3 class="page-data-num">
+                ****
+              </h3>
+              <p class="page-data-item">
+                <span class="page-data-itemText">本周新增</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+              <p class="page-data-item">
+                <span class="page-data-itemText">30天内采购客户</span>
+                <span class="page-data-itemText">
+                  ****
+                </span>
+              </p>
+            </div>
+            <span class="page-data-line"></span>
+          </div>
+        </a-col>
+        <a-col :span="6">
+          <div class="page-data-module">
+            <div class="page-data-con">
+              <p class="page-data-tit">总库存(个)</p>
+              <h3 class="page-data-num" style="line-height: 36px;">
+                ****
+              </h3>
+              <p class="page-data-tit">库存总金额(元)</p>
+              <h3 class="page-data-num" style="line-height: 36px;margin: 0;">
+                ****
+              </h3>
+            </div>
+          </div>
+        </a-col>
+      </a-row>
     </a-card>
     <div>
       <a-row>
@@ -211,7 +330,7 @@
 </template>
 
 <script>
-import { commonMixin } from '@/utils/mixin'
+import { mixin, commonMixin } from '@/utils/mixin'
 import { mapGetters } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
 import newProduct from '@/views/productManagement/newProduct/modal.vue'
@@ -220,10 +339,11 @@ import { bizStateCount, bizData, dealerData } from '@/api/data'
 export default {
   name: 'Home',
   components: { ResetPwd, newProduct },
-  mixins: [commonMixin],
+  mixins: [mixin, commonMixin],
   data () {
     return {
       message: '欢迎登录' + process.env.VUE_APP_PRO_NAME,
+      hiddenBizData: true, // 隐藏数据概览
       openResetPwd: false, //  重置密码是否显示
       openNewProduct: false,
       onlineFalg: '1', // 上下线标识  1为上线,0为下线
@@ -234,7 +354,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_customer.png'),
               name: '客户',
               styleC: 'blue-color',
-              url: '/customerManagement/customerInfo/list',
+              url: 'customerInfoList',
               permission: 'M_customerInfoList',
               orderNum: ''
             }
@@ -244,7 +364,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '销售开单',
               styleC: 'red-color',
-              url: '/salesManagement/salesQuery/list',
+              url: 'salesQueryList',
               permission: 'M_salesQueryList',
               orderNum: ''
             },
@@ -252,7 +372,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_return.png'),
               name: '销售退货',
               styleC: 'red-color',
-              url: '/salesManagement/salesReturn/list',
+              url: 'salesReturnList',
               permission: 'M_salesReturnList',
               orderNum: ''
             }
@@ -262,7 +382,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '销售审核',
               styleC: 'blue-color',
-              url: '/salesManagement/salesQuery/list',
+              url: 'salesQueryList',
               params: { billStatus: 'WAIT_AUDIT' },
               permission: 'M_salesQueryList',
               orderNum: 'salesWaitAuditCount'
@@ -271,7 +391,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: '/salesManagement/salesReturn/list',
+              url: 'salesReturnList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_salesReturnList',
               orderNum: 'salesReturnWaitAuditCount'
@@ -282,8 +402,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
               name: '销售出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'SALES' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'SALES' },
               permission: 'M_outboundList',
               orderNum: 'salesWaitOutWarehouseCount'
             },
@@ -291,8 +411,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'SELL_REFUND', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'SELL_REFUND', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'salesReturnFinancialWaitCount'
             }
@@ -302,8 +422,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'SELL', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'SELL', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'salesFinancialWaitCount'
             },
@@ -325,7 +445,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_purchase_billing.png'),
               name: '采购开单',
               styleC: 'red-color',
-              url: '/purchasingManagement/purchaseOrder/list',
+              url: 'purchaseOrderList',
               permission: 'M_purchasingList',
               orderNum: ''
             },
@@ -333,7 +453,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_purchase_return.png'),
               name: '采购退货',
               styleC: 'red-color',
-              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? '/purchasingManagement/purchaseReturnOutSync/list' : '/purchasingManagement/purchaseReturn/list',
+              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncList' : 'purchaseReturnList',
               permission: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'M_purchaseReturn_outSnycList' : 'M_purchaseReturnList',
               orderNum: ''
             }
@@ -343,7 +463,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '入库审核',
               styleC: 'blue-color',
-              url: '/financialManagement/warehousingAudit/list',
+              url: 'warehousingAuditList',
               params: { auditState: 'WAIT_PUT_WAREHOUSE_AUDIT' },
               permission: 'M_warehousingAuditList',
               orderNum: 'purchaseWaitAuditCount'
@@ -352,10 +472,10 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? '/purchasingManagement/purchaseReturnOutSync/list' : '/purchasingManagement/purchaseReturn/list',
+              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncList' : 'purchaseReturnList',
               params: { state: 'WAIT_AUDIT' },
               permission: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'M_purchaseReturn_outSnycList' : 'M_purchaseReturnList',
-              orderNum: 'purchaseReturnWaitAuditCount'
+              orderNum: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncWaitAuditCount' : 'purchaseReturnWaitAuditCount'
             }
           ],
           [
@@ -363,8 +483,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'PURCHASE', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'PURCHASE', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'purchaseFinancialWaitCount'
             },
@@ -372,10 +492,10 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务收款',
               styleC: 'red-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'PURCHASE_RETURN', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'PURCHASE_RETURN', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
-              orderNum: 'purchaseReturnFinancialWaitCount'
+              orderNum: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncFinancialWaitCount' : 'purchaseReturnFinancialWaitCount'
             }
           ]
         ],
@@ -385,7 +505,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_supplier.png'),
               name: '供应商(其他)',
               styleC: 'blue-color',
-              url: '/supplierManagement/supplierInfo/list',
+              url: 'supplierInfoList',
               permission: 'M_supplierInfoList',
               orderNum: ''
             }
@@ -395,7 +515,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_scatter_warehousing.png'),
               name: '散件入库',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkWarehousingOrder/list',
+              url: 'bulkWarehousingOrderList',
               permission: 'M_bulkWarehousingOrderList',
               orderNum: ''
             },
@@ -403,7 +523,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_scatter_return.png'),
               name: '散件退货',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               permission: 'M_bulkReturnGoodsList',
               orderNum: ''
             }
@@ -413,7 +533,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '待入库',
               styleC: 'blue-color',
-              url: '/bulkManagement/bulkWarehousingOrder/list',
+              url: 'bulkWarehousingOrderList',
               params: { state: 'WAIT_PUT_WAREHOUSE' },
               permission: 'M_bulkWarehousingOrderList',
               orderNum: 'sparePartsPurchaseWaitAuditCount'
@@ -422,7 +542,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_bulkReturnGoodsList',
               orderNum: 'sparePartsReturnWaitAuditCount'
@@ -433,8 +553,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'PARTS_INPUT', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'PARTS_INPUT', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'sparePartsPurchaseFinancialWaitCount'
             },
@@ -442,7 +562,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
               name: '待出库',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               params: { state: 'WAIT_OUT_WAREHOUSE' },
               permission: 'M_bulkReturnGoodsList',
               orderNum: 'sparePartsReturnWaitOutWarehouseCount'
@@ -454,8 +574,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'SPARE_PARTS_RETURN', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'SPARE_PARTS_RETURN', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'sparePartsReturnFinancialWaitCount'
             }
@@ -476,7 +596,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stor_out.png'),
               name: '店内调出',
               styleC: 'red-color',
-              url: '/allocationManagement/storeTransferOut/list',
+              url: 'storeTransferOutList',
               permission: 'M_storeTransferOutList',
               orderNum: ''
             },
@@ -484,7 +604,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '仓库调拨',
               styleC: 'red-color',
-              url: '/allocationManagement/warehouseAllocation/list',
+              url: 'warehouseAllocationList',
               permission: 'M_warehouseAllocationList',
               orderNum: ''
             },
@@ -492,7 +612,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '连锁调出',
               styleC: 'red-color',
-              url: '/allocationManagement/chainTransferOut/list',
+              url: 'chainTransferOutList',
               permission: 'M_chainTransferOutList',
               orderNum: ''
             }
@@ -502,7 +622,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调出审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/storeTransferOut/list',
+              url: 'storeTransferOutList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_storeTransferOutList',
               orderNum: 'storeCallOutWaitAuditCount'
@@ -511,7 +631,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调拨审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/warehouseAllocation/list',
+              url: 'warehouseAllocationList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_warehouseAllocationList',
               orderNum: 'alloWarehouseWaitAuditCount'
@@ -520,7 +640,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调出审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/chainTransferOut/list',
+              url: 'chainTransferOutList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_chainTransferOutList',
               orderNum: 'alloLinkageOutWaitAuditCount'
@@ -529,20 +649,20 @@ export default {
           [
             {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
-              name: '出库审核',
+              name: '调出出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'SHOP_CALL_OUT' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'SHOP_CALL_OUT' },
               permission: 'M_outboundList',
               orderNum: 'storeCallOutWaitOutWarehouseCount'
             },
             {},
             {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
-              name: '出库审核',
+              name: '调出出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'LINKAGE_CALL_OUT' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'LINKAGE_CALL_OUT' },
               permission: 'M_outboundList',
               orderNum: 'alloLinkageOutWaitOutWarehouseCount'
             }
@@ -552,8 +672,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'STORE_CALL_OUT', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'STORE_CALL_OUT', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'storeCallOutFinancialWaitCount'
             },
@@ -573,7 +693,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_receivable.png'),
               name: '应收应付',
               styleC: 'blue-color',
-              url: '/financialManagement/companyReceivablePayable/list',
+              url: 'companyReceivablePayableList',
               permission: 'M_companyReceivablePayableList',
               orderNum: ''
             },
@@ -581,8 +701,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'ALL' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'ALL' },
               permission: 'M_financialCollectionList',
               orderNum: ''
             }
@@ -592,7 +712,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_unit.png'),
               name: '收付款记录',
               styleC: 'blue-color',
-              url: '/financialManagement/companyCollectionPayment/list',
+              url: 'companyCollectionPaymentList',
               permission: 'M_companyCollectionPaymentList',
               orderNum: ''
             },
@@ -600,8 +720,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_pay.png'),
               name: '财务付款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'ALL' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'ALL' },
               permission: 'M_financialPaymentList',
               orderNum: ''
             }
@@ -615,7 +735,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock s.png'),
               name: '实时库存',
               styleC: 'blue-color',
-              url: '/inventoryManagement/inventoryQuery/list',
+              url: 'inventoryQueryList',
               permission: 'M_inventoryInventoryQueryList',
               orderNum: ''
             }
@@ -625,7 +745,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_inventory.png'),
               name: '库存盘点',
               styleC: 'blue-color',
-              url: '/inventoryManagement/inventoryChecking/list',
+              url: 'inventoryCheckingList',
               permission: 'M_inventoryCheckingList',
               orderNum: ''
             }
@@ -656,7 +776,7 @@ export default {
     seeMore () {
       this.openNewProduct = false
       if (this.onlineFalg == '1') { // 上线
-        this.$router.push({ path: '/productManagement/productOnlineInfo/list' })
+        this.$router.push({ name: 'productOnlineInfo' })
       } else { // 下线
         this.$router.push({ name: 'newProductList', params: { onlineFalg: this.onlineFalg } })
       }
@@ -683,26 +803,17 @@ export default {
     // 导航跳转
     goPage (data, subInd) {
       if (data) {
+        let params = null
         // 有待办数据,则跳转带有条件的;若无待办数据,则跳转全部数据
-        if (data.orderNum && this.countData[data.orderNum]) {
-          this.$router.push({ path: data.url, query: { pageParams: data.params ? data.params : null } })
+        if (data.orderNum && this.countData[data.orderNum] || data.params) {
+          params = { pageParams: data.params, type: 'todo' }
         } else {
-          if (data.url == '/outboundOrderManagement/outboundOrder/list') { // 出库
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ outBizType: params && params.outBizType ? params.outBizType : null }) } })
-          } else if (data.url == '/financialManagement/financialPayment/list') { // 财务付款
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ bizType: params && params.bizType ? params.bizType : null }) } })
-          } else if (data.url == '/financialManagement/financialCollection/list') { // 财务收款
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ bizType: params && params.bizType ? params.bizType : null }) } })
-          } else {
-            this.$router.push({ path: data.url, query: { pageParams: null } })
-          }
-        }
-        if (subInd == '1') {
-          this.$store.state.app.isHomeNav = true
+          params = { pageParams: null, type: subInd == 1 ? 'new' : 'todo' }
         }
+        this.setIsHomeNav(data.url, params)
+        setTimeout(() => {
+          this.$router.push({ name: data.url })
+        }, 100)
       }
     },
     // 数据看板信息
@@ -870,5 +981,51 @@ export default {
     .right-con{
       margin-left: 10px;
     }
+
+    &.small{
+      .page-cont{
+        .page-tit,
+        .page-list li,
+        .page-nav-badge .page-nav-n span{
+          font-size: 14px!important;
+        }
+      }
+      .page-data-module{
+        .page-data-tit,
+        .page-data-itemText{
+          font-size: 14px!important;
+        }
+      }
+    }
+    &.middle{
+      .page-cont{
+        .page-tit,
+        .page-list li,
+        .page-nav-badge .page-nav-n span{
+          font-size: 14px!important;
+        }
+      }
+      .page-data-module{
+        .page-data-tit,
+        .page-data-itemText{
+          font-size: 14px!important;
+        }
+      }
+    }
+    &.large{
+      .page-cont{
+        .page-tit,
+        .page-list li,
+        .page-nav-badge .page-nav-n span{
+          font-size: 16px!important;
+        }
+      }
+      .page-data-module{
+        .page-data-tit,
+        .page-data-itemText{
+          font-size: 16px!important;
+        }
+      }
+    }
   }
 </style>

+ 14 - 11
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -97,19 +97,21 @@
               bordered>
               <!-- 调出数量 -->
               <template slot="outQty" slot-scope="text, record">
-                <a-input-number
-                  size="small"
-                  id="chainTransferOutEdit-outQty"
-                  v-model="record.outQty"
-                  :precision="0"
-                  :min="1"
-                  :max="record.currentQty"
-                  placeholder="请输入"
-                  style="width: 100%;" />
+                <div @dblclick.stop>
+                  <a-input-number
+                    size="small"
+                    id="chainTransferOutEdit-outQty"
+                    v-model="record.outQty"
+                    :precision="0"
+                    :min="1"
+                    :max="record.currentQty"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </div>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+                <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -325,6 +327,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }
@@ -364,7 +367,7 @@ export default {
       allocLinkageOutDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          if(isEdit){
+          if (isEdit) {
             this.$refs.table.refresh()
           }
           this.$refs.chooseTable.refresh()

+ 41 - 24
src/views/allocationManagement/chainTransferOut/list.vue

@@ -224,10 +224,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.putTenantSn = undefined
       this.queryParam.allocationType = undefined
       this.queryParam.state = undefined
@@ -235,6 +235,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/chainTransferOut/add/${data.id}/${data.allocationLinkageOutSn}` })
     },
     //  删除
@@ -330,6 +332,39 @@ export default {
       })
       this.openModal = false
       this.getPutTenantList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -347,27 +382,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 1 - 1
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -98,7 +98,7 @@
                   v-if="record.currentQty"
                   type="link"
                   class="button-primary"
-                  @click="handleAdd(record)"
+                  @click.stop="handleAdd(record)"
                   id="storeTransferOutEdit-add-btn">添加</a-button>
                 <span v-else>--</span>
               </template>

+ 40 - 22
src/views/allocationManagement/storeTransferOut/list.vue

@@ -214,10 +214,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.putPersonName = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
@@ -225,6 +225,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/storeTransferOut/add/${data.id}/${data.storeCallOutSn}` })
     },
     //  删除
@@ -315,6 +317,39 @@ export default {
       })
       this.openModal = false
       this.getStoreCallOutTypeAllList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -333,26 +368,9 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 20 - 13
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -99,21 +99,25 @@
               </template>
               <!-- 调入仓位 -->
               <template slot="putWarehouseLocationSn" slot-scope="text, record">
-                <a-select size="small" id="warehouseAllocationEdit-putWarehouseLocationSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
-                  <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
-                </a-select>
+                <div @dblclick.stop>
+                  <a-select size="small" id="warehouseAllocationEdit-putWarehouseLocationSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
+                    <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                  </a-select>
+                </div>
               </template>
               <!-- 调出数量 -->
               <template slot="outQty" slot-scope="text, record">
-                <a-input-number
-                  size="small"
-                  id="warehouseAllocationEdit-outQty"
-                  v-model="record.outQty"
-                  :precision="0"
-                  :min="1"
-                  :max="record.currentQty"
-                  placeholder="请输入"
-                  style="width: 100%;" />
+                <div @dblclick.stop>
+                  <a-input-number
+                    size="small"
+                    id="warehouseAllocationEdit-outQty"
+                    v-model="record.outQty"
+                    :precision="0"
+                    :min="1"
+                    :max="record.currentQty"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </div>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
@@ -352,6 +356,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }
@@ -414,7 +419,9 @@ export default {
       allocWarehouseDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.$refs.table.refresh()
+          if (isEdit) {
+            this.$refs.table.refresh()
+          }
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {

+ 44 - 24
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -88,7 +88,7 @@
             size="small"
             type="link"
             class="button-primary"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="warehouseAllocationList-edit-btn">
             编辑
           </a-button>
@@ -198,10 +198,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime,
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.outWarehouseSn = undefined
       this.queryParam.putWarehouseSn = undefined
       this.queryParam.state = undefined
@@ -253,7 +253,11 @@ export default {
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.allocationWarehouseSn}` })
     },
     //  新增/编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
     },
     pageInit () {
@@ -262,6 +266,39 @@ export default {
         _this.setTableH()
       })
       this.getWarehouseList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -280,26 +317,9 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 26 - 4
src/views/bulkManagement/bulkImport/list.vue

@@ -44,7 +44,7 @@
         :defaultLoadData="false"
         bordered>
       </s-table>
-      <div class="btn-con" v-if="uploadData && uploadData.stockImportSn">
+      <div class="btn-con" v-if="uploadData && uploadData.stockImportSn && listData.length">
         <a-button
           id="productInfoList-batchAudit"
           type="primary"
@@ -65,6 +65,14 @@
           style="margin: 0 15px;">导出错误项</a-button>
       </div>
     </a-spin>
+    <common-modal
+      :openModal="openTipsModal"
+      :modalHtml="modalHtml"
+      modalTit="操作提示"
+      okText="确定"
+      :isCancel="false"
+      @ok="openTipsModal=false"
+      @close="openTipsModal=false" />
   </a-card>
 </template>
 
@@ -73,12 +81,15 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, Upload } from '@/components'
 import { stockImportList, stockImportFinish, stockImportCancel, stockImportExportError } from '@/api/stockImport'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import commonModal from '@/views/common/commonModal.vue'
 export default {
   name: 'StockImportList',
-  components: { STable, Upload },
+  components: { STable, Upload, commonModal },
   mixins: [commonMixin],
   data () {
     return {
+      openTipsModal: false,
+      modalHtml: '',
       spinning: false,
       exportLoading: false, // 导出loading
       tableHeight: 0,
@@ -112,11 +123,17 @@ export default {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
             }
+            this.listData = data.list
+            if (this.uploadData && data.list.length == 0) {
+              this.$message.info('没有可导入数据,请检查模板是否为空')
+              this.resetSearchForm()
+            }
           }
           this.spinning = false
           return data
         })
       },
+      listData: [],
       attachAction: process.env.VUE_APP_API_BASE_URL + '/stockImport/importForSpareParts',
       uploadParams: {
         savePathType: 'local'
@@ -155,6 +172,7 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.resetSearchForm()
+              _this.showSuccessModal(res.data)
               _this.spinning = false
             } else {
               _this.spinning = false
@@ -163,6 +181,12 @@ export default {
         }
       })
     },
+    showSuccessModal (data) {
+      if (data) {
+        this.openTipsModal = true
+        this.modalHtml = `<div><div>库存导入成功</div><div>入库类型:散件导入</div><div>库存批次:${data.stockBatchNo}</div><div>总导入款数:${data.productTotalCategory}</div><div>总入库数量:${data.productTotalQty}</div><div>总入库成本:${data.productTotalCost}</div></div>`
+      }
+    },
     // 取消导入
     handleCancel () {
       const _this = this
@@ -184,8 +208,6 @@ export default {
         }
       })
     },
-    // 下载模板
-    handleExport () {},
     // 导出错误项
     handleExportError () {
       const _this = this

+ 24 - 19
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -62,31 +62,35 @@
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
-            <a-input-number
-              size="small"
-              id="bulkReturnGoodsEdit-purchaseCost"
-              v-model="record.purchaseCost"
-              :precision="2"
-              :min="0"
-              :max="999999"
-              placeholder="请输入"
-              style="width: 100%;" />
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                id="bulkReturnGoodsEdit-purchaseCost"
+                v-model="record.purchaseCost"
+                :precision="2"
+                :min="0"
+                :max="999999"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
           </template>
           <!-- 退货数量 -->
           <template slot="purchaseQty" slot-scope="text, record">
-            <a-input-number
-              size="small"
-              id="bulkReturnGoodsEdit-purchaseQty"
-              v-model="record.purchaseQty"
-              :precision="0"
-              :min="1"
-              :max="record.currentQty"
-              placeholder="请输入"
-              style="width: 100%;" />
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                id="bulkReturnGoodsEdit-purchaseQty"
+                v-model="record.purchaseQty"
+                :precision="0"
+                :min="1"
+                :max="record.currentQty"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
           </template>
         </s-table>
       </a-card>
@@ -430,6 +434,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }

+ 24 - 19
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -53,31 +53,35 @@
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
-            <a-input-number
-              size="small"
-              id="bulkReturnGoodsEdit-purchaseCost"
-              v-model="record.purchaseCost"
-              :precision="2"
-              :min="0"
-              :max="999999"
-              placeholder="请输入"
-              style="width: 100%;" />
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                id="bulkReturnGoodsEdit-purchaseCost"
+                v-model="record.purchaseCost"
+                :precision="2"
+                :min="0"
+                :max="999999"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
           </template>
           <!-- 退货数量 -->
           <template slot="purchaseQty" slot-scope="text, record">
-            <a-input-number
-              size="small"
-              id="bulkReturnGoodsEdit-purchaseQty"
-              v-model="record.purchaseQty"
-              :precision="0"
-              :min="1"
-              :max="record.currentStockQty"
-              placeholder="请输入"
-              style="width: 100%;" />
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                id="bulkReturnGoodsEdit-purchaseQty"
+                v-model="record.purchaseQty"
+                :precision="0"
+                :min="1"
+                :max="record.currentStockQty"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
           </template>
         </s-table>
       </a-card>
@@ -427,6 +431,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }

+ 41 - 24
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -231,10 +231,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.sparePartsReturnNo = ''
       this.queryParam.supplierSn = undefined
       this.queryParam.isGrab = undefined
@@ -243,6 +243,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.handleEdit(data)
     },
     //  新增
@@ -347,6 +349,39 @@ export default {
       })
       this.openModal = false
       this.getSupplierList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -364,27 +399,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 89 - 43
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -41,24 +41,40 @@
               <div class="table-page-search-wrapper">
                 <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
                   <a-row :gutter="15">
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="关键词">
-                        <a-input id="bulkWarehousingOrderEdit-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码"/>
-                      </a-form-item>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品编码">
+                        <a-input id="bulkWarehousingOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                      </a-form-model-item>
                     </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <ProductBrand id="bulkWarehousingOrderEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
-                      </a-form-item>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品名称">
+                        <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="原厂编码">
+                        <a-input id="bulkWarehousingOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+                      </a-form-model-item>
                     </a-col>
-                    <a-col :md="6" :sm="24">
+                    <a-col :md="4" :sm="24">
                       <a-form-item label="产品分类">
                         <ProductType id="productInfoList-productType" @change="changeProductType" v-model="productType"></ProductType>
                       </a-form-item>
                     </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                    <template v-if="advanced">
+                      <a-col :md="4" :sm="24">
+                        <a-form-item label="产品品牌">
+                          <ProductBrand id="bulkWarehousingOrderEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                        </a-form-item>
+                      </a-col>
+                    </template>
+                    <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
                       <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
+                      <a @click="advanced=!advanced" style="margin:0 30px 0 10px">
+                        {{ advanced ? '收起' : '展开' }}
+                        <a-icon :type="advanced ? 'up' : 'down'"/>
+                      </a>
                     </a-col>
                   </a-row>
                 </a-form>
@@ -77,45 +93,52 @@
                 bordered>
                 <!-- 成本价 -->
                 <template slot="putCost" slot-scope="text, record">
-                  <a-input-number
-                    size="small"
-                    id="bulkWarehousingOrderEdit-putCost"
-                    v-model="record.putCost"
-                    :precision="2"
-                    :min="0"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
+                  <div @dblclick.stop>
+                    <a-input-number
+                      size="small"
+                      id="bulkWarehousingOrderEdit-putCost"
+                      v-model="record.putCost"
+                      :precision="2"
+                      :min="0"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </div>
                 </template>
                 <!-- 数量 -->
                 <template slot="putQty" slot-scope="text, record">
-                  <a-input-number
-                    size="small"
-                    id="bulkWarehousingOrderEdit-putQty"
-                    v-model="record.putQty"
-                    :precision="0"
-                    :min="1"
-                    :max="999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
+                  <div @dblclick.stop>
+                    <a-input-number
+                      size="small"
+                      @dblclick.stop
+                      id="bulkWarehousingOrderEdit-putQty"
+                      v-model="record.putQty"
+                      :precision="0"
+                      :min="1"
+                      :max="999999"
+                      placeholder="请输入"
+                      style="width: 100%;" />
+                  </div>
                 </template>
                 <!-- 仓库仓位 -->
                 <template slot="warehouse" slot-scope="text, record, index">
-                  <a-cascader
-                    size="small"
-                    @change="e => changeWarehouseCascade(e, record, index, 'dealerProduct')"
-                    v-model="record.warehouseCascade"
-                    expand-trigger="hover"
-                    :allowClear="false"
-                    :options="warehouseCascadeData"
-                    :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                    id="bulkWarehousingOrderEdit-warehouseCascade"
-                    placeholder="请选择仓库仓位"
-                    style="width: 100%;" />
+                  <div @dblclick.stop>
+                    <a-cascader
+                      size="small"
+                      @change="e => changeWarehouseCascade(e, record, index, 'dealerProduct')"
+                      v-model="record.warehouseCascade"
+                      expand-trigger="hover"
+                      :allowClear="false"
+                      :options="warehouseCascadeData"
+                      :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                      id="bulkWarehousingOrderEdit-warehouseCascade"
+                      placeholder="请选择仓库仓位"
+                      style="width: 100%;" />
+                  </div>
                 </template>
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record">
-                  <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
+                  <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
                 </template>
               </s-table>
             </div>
@@ -252,12 +275,15 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
+      advanced: false,
       spinning: false,
       loading: false,
       chooseLoading: false,
       showNewProduct: false,
       queryParam: {
-        queryWord: '',
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
         productBrandSn: undefined,
         productTypeSn1: undefined,
         productTypeSn2: undefined,
@@ -285,7 +311,6 @@ export default {
         this.disabled = true
         parameter.sortAlias = 'dp'
         const params = Object.assign(parameter, this.queryParam, { supplierSn: this.$route.params.supplierSn })
-        params.enabledFlag = 1
         return bulkProductList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -394,6 +419,7 @@ export default {
           }
         })
       } else {
+        // 新添加的产品自动添加到已选产品中
         if (data.length == 1 && this.showNewProduct) {
           data[0].putCost = this.paramsData.putCost
           data[0].putQty = this.paramsData.putQty
@@ -411,7 +437,9 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.queryWord = ''
+      this.queryParam.name = ''
+      this.queryParam.code = ''
+      this.queryParam.origCode = ''
       this.queryParam.productBrandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
@@ -435,6 +463,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }
@@ -452,6 +481,7 @@ export default {
     },
     //  添加/编辑
     handleAdd (row, isEdit) {
+      const _this = this
       if (!isEdit && !(row.putCost || row.putCost == 0)) {
         this.$message.warning('请输入成本价后再添加!')
         return
@@ -468,6 +498,21 @@ export default {
         this.$message.warning('请选择仓位后再添加!')
         return
       }
+      if (!isEdit && row.enabledFlag == '0') {
+        _this.$confirm({
+          title: '提示',
+          content: '该产品已禁用,确认继续添加吗?',
+          centered: true,
+          onOk () {
+            _this.saveFormData(row, isEdit)
+          }
+        })
+        return
+      }
+      this.saveFormData(row, isEdit)
+    },
+    // 保存
+    saveFormData (row, isEdit) {
       const params = {
         id: isEdit ? row.id : undefined,
         sparePartsPurchaseSn: this.$route.params.sn,
@@ -653,6 +698,7 @@ export default {
       this.resetSearchForm()
       this.$refs.chooseTable.refresh(true)
       this.openModal = false
+      this.$refs.searchProductCode.focus()
     }
   },
   mounted () {

+ 41 - 24
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -248,6 +248,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (row) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}/${row.supplierSn}` })
     },
     //  编辑
@@ -306,10 +308,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.sparePartsPurchaseNo = ''
       this.queryParam.supplierSn = undefined
       this.queryParam.state = undefined
@@ -362,6 +364,39 @@ export default {
       })
       this.openModal = false
       this.getSupplierList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -379,27 +414,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 2 - 2
src/views/common/commonModal.vue

@@ -86,7 +86,7 @@ export default {
   .common-modal{
     .common-main{
       display: flex;
-      line-height: 20px;
+      line-height: 24px;
       .common-cont{
         .common-tit{
           color: rgba(0, 0, 0);
@@ -104,7 +104,7 @@ export default {
       }
     }
     .btn-box{
-      text-align: right;
+      text-align: center;
       margin-top: 20px;
     }
   }

+ 138 - 0
src/views/common/pdfViewModal.vue

@@ -0,0 +1,138 @@
+<template>
+  <a-modal
+    centered
+    class="common-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancle="handleCommonCancel"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <div style="width: 100%;height: 500px;overflow: auto;border: 1px solid #eee;">
+          {{ page }} <span @click="page=page+1">下一页</span>
+          <div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
+          <pdf
+            ref="pdf"
+            v-for="(item,index) in pdfList"
+            :key="'pdf-'+index"
+            style="width: 100%;"
+            :src="getUrl('data:application/pdf;base64,' + item)"
+            :page="page"
+            :rotate="rotate"
+            @progress="loadedRatio = $event"
+            @error="error"
+            @num-pages="numPages = $event"
+            @link-clicked="page = $event"></pdf>
+        </div>
+      </div>
+      <div class="btn-box">
+        <a-button type="default" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button type="primary" class="button-error" @click="handleCommonOk">{{ okText }}</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import pdf from 'vue-pdf'
+import CMapReaderFactory from 'vue-pdf/src/CMapReaderFactory.js'
+export default {
+  components: {
+    pdf
+  },
+  name: 'PdfViewModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: '打印预览'
+    },
+    okText: { // 确定 按钮文字
+      type: String,
+      default: '打印'
+    },
+    cancelText: { // 取消 按钮文字
+      type: String,
+      default: '取消'
+    },
+    isCancel: { // 是否显示  取消 按钮
+      type: Boolean,
+      default: true
+    },
+    spinning: { // 加载中
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      show: true,
+      pdfList: [],
+      src: '',
+      loadedRatio: 0,
+      page: 1,
+      numPages: 0,
+      rotate: 0,
+      curpage: 1,
+      total: 3
+    }
+  },
+  methods: {
+    getUrl (item) {
+      return pdf.createLoadingTask({ url: item, CMapReaderFactory })
+    },
+    setData (data) {
+      this.pdfList = data
+      this.src = data[0]
+      this.curpage = 1
+      this.total = data.length
+    },
+    error: function (err) {
+      console.log(err)
+    },
+    // 确定
+    handleCommonOk () {
+      this.$emit('ok')
+    },
+    // 取消
+    handleCommonCancel () {
+      this.isShow = false
+      this.pdfList = []
+    },
+    // 下载
+    handleDownload () {
+
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('cancel')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .common-modal{
+    .common-main{
+    }
+    .btn-box{
+      text-align: center;
+      margin-top: 20px;
+    }
+  }
+</style>

+ 1 - 1
src/views/common/productBrand.js

@@ -47,7 +47,7 @@ const ProductBrand = {
       console.log(input, option.data.attrs.pinyin)
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 || 
-        option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        option.data.attrs.pinyin && option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
     handleChange(value) {

+ 23 - 7
src/views/common/productType.js

@@ -1,4 +1,5 @@
 import { productTypeQuery } from '@/api/productType'
+import { dealerProductTypeList } from '@/api/dealerProductType'
 const ProductType = {
   template: `
       <a-cascader
@@ -22,6 +23,10 @@ const ProductType = {
     id: {
       type: String,
       default: ''
+    },
+    isDealer: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -45,13 +50,24 @@ const ProductType = {
     },
     //  产品分类列表
     getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
+      if(this.isDealer){
+        dealerProductTypeList({}).then(res => {
+          if (res.status == 200) {
+            this.productTypeList = res.data
+          } else {
+            this.productTypeList = []
+          }
+        })
+      }else{
+        productTypeQuery({}).then(res => {
+          if (res.status == 200) {
+            this.productTypeList = res.data
+          } else {
+            this.productTypeList = []
+          }
+        })
+      }
+      
     }
   }
 }

+ 2 - 2
src/views/common/settleStyle.js

@@ -54,9 +54,9 @@ const SettleStyle = {
     },
     handleChange(value) {
       this.defaultVal = value;
-      const settleStyleName = this.list.find(item => item[this.defValKey] == value).name
+      const settleStyleName = this.list.find(item => item[this.defValKey] == value)
       this.$emit('input', value);
-      this.$emit('change', this.value, settleStyleName);
+      this.$emit('change', this.value, settleStyleName?settleStyleName.name:'');
     },
     // 列表数据
     getList () {

+ 33 - 13
src/views/financialManagement/financialCollection/list.vue

@@ -35,6 +35,11 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
+              <!-- <a-col :md="6" :sm="24">
+                <a-form-item label="创建时间">
+                  <rangeDate ref="createDate" @change="createDateChange" />
+                </a-form-item>
+              </a-col> -->
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
                   <rangeDate ref="rangeDate" @change="dateChange" />
@@ -211,8 +216,9 @@ export default {
         { title: '待收金额', dataIndex: 'unsettleAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '收款类型', dataIndex: 'bizName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款方式', dataIndex: 'settleStyleName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款时间', dataIndex: 'settleTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款时间', dataIndex: 'settleTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
       ],
       loading: false,
@@ -280,6 +286,10 @@ export default {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    createDateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     // 总计
     settleReceiptQuerySum (params) {
       settleReceiptQuerySum(params).then(res => {
@@ -293,9 +303,7 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          if (this.$route.query.pageParams) {
-            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-          } else {
+          if (this.curBizType == 'ALL') {
             this.queryParam.bizType = res.data[0].bizType
           }
           this.$refs.table.refresh(true)
@@ -392,6 +400,7 @@ export default {
     resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
+        // this.$refs.createDate.resetDate()
       }
       this.queryParam = {
         bizType: this.curBizType,
@@ -399,6 +408,8 @@ export default {
         bizNo: '',
         settleClientName: '',
         billState: '',
+        beginDate: '',
+        endDate: '',
         auditBeginDate: '',
         auditEndDate: ''
       }
@@ -433,20 +444,29 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab || this.$route.query.pageParams) {
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.curBizType = isHomeNav.pageParams.bizType
       this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-        this.queryParam.billState = JSON.parse(this.$route.query.pageParams).billState
-      }
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.pageInit()
+    } else {
+      // 如果是新页签打开,则重置当前页面
+      if (this.$store.state.app.isNewTab) {
+        this.curBizType = 'ALL'
+        this.resetData()
+        this.pageInit()
+      }
     }
+
     // 结算账户状态查询
-    if(this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')){
+    if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
     	this.GetSettleAccountState().then(res => {
     	  if (res.status == 200) {
-    		this.enableFundAccount = res.data.functionEnableFlag == 1
+          this.enableFundAccount = res.data.functionEnableFlag == 1
     	  }
     	})
     }

+ 33 - 13
src/views/financialManagement/financialPayment/list.vue

@@ -34,6 +34,11 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <!-- <a-col :md="6" :sm="24">
+                <a-form-item label="创建时间">
+                  <rangeDate ref="createDate" @change="createDateChange" />
+                </a-form-item>
+              </a-col> -->
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
                   <rangeDate ref="rangeDate" @change="dateChange" />
@@ -166,8 +171,9 @@ export default {
         { title: '待付金额', dataIndex: 'unsettleAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '单据类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款方式', dataIndex: 'settleStyleName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '付款时间', dataIndex: 'settleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '付款时间', dataIndex: 'settleTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
       ],
       loading: false,
@@ -219,6 +225,10 @@ export default {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    createDateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     // 总计
     settlePayQuerySum (params) {
       settlePayQuerySum(params).then(res => {
@@ -232,9 +242,7 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          if (this.$route.query.pageParams) {
-            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-          } else {
+          if (this.curBizType == 'ALL') {
             this.queryParam.bizType = res.data[0].bizType
           }
           this.$refs.table.refresh(true)
@@ -332,6 +340,7 @@ export default {
     resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
+        // this.$refs.createDate.resetDate()
       }
       this.queryParam = {
         bizType: this.curBizType,
@@ -339,6 +348,8 @@ export default {
         bizNo: '',
         settleClientName: '',
         billState: '',
+        beginDate: '',
+        endDate: '',
         auditBeginDate: '',
         auditEndDate: ''
       }
@@ -373,20 +384,29 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab || this.$route.query.pageParams) {
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.curBizType = isHomeNav.pageParams.bizType
       this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-        this.queryParam.billState = JSON.parse(this.$route.query.pageParams).billState
-      }
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.pageInit()
+    } else {
+      // 如果是新页签打开,则重置当前页面
+      if (this.$store.state.app.isNewTab) {
+        this.curBizType = 'ALL'
+        this.resetData()
+        this.pageInit()
+      }
     }
+
     // 结算账户状态查询
-    if(this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')){
+    if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
     	this.GetSettleAccountState().then(res => {
     	  if (res.status == 200) {
-    		this.enableFundAccount = res.data.functionEnableFlag == 1
+    		 this.enableFundAccount = res.data.functionEnableFlag == 1
     	  }
     	})
     }

+ 26 - 3
src/views/financialManagement/inventoryCheckAudit/list.vue

@@ -56,7 +56,7 @@
             v-if="record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit')"
             type="link"
             class="button-primary"
-            @click="handleExamine(record, true)"
+            @click="handleOk(record, true)"
             id="warehousingAudit-adopt-btn">通过</a-button>
           <a-button
             size="small"
@@ -71,6 +71,8 @@
     </a-spin>
     <!-- 详情 -->
     <inventoryChecking-detail-modal :openModal="openDetailModal" :itemSn="itemSn" @close="handleDetailClose" />
+    <!-- 设置成本价 -->
+    <setPriceModal ref="setPriceModal" @ok="handleOk" :openModal="openCostPriceModal" @close="openCostPriceModal=false"></setPriceModal>
   </a-card>
 </template>
 
@@ -80,10 +82,11 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import stateIcon from '@/views/common/stateIcon'
 import inventoryCheckingDetailModal from '@/views/inventoryManagement/inventoryChecking/detailModal.vue'
-import { checkWarehouseAuditList, checkWarehouseFinanceAudit, checkWarehouseReInventory } from '@/api/checkWarehouse'
+import setPriceModal from './setPriceModal.vue'
+import { checkWarehouseAuditList, checkWarehouseFinanceAudit, checkWarehouseReInventory, queryStockProductCostNull } from '@/api/checkWarehouse'
 export default {
   name: 'InventoryCheckingList',
-  components: { STable, VSelect, rangeDate, inventoryCheckingDetailModal, stateIcon },
+  components: { STable, VSelect, rangeDate, inventoryCheckingDetailModal, stateIcon, setPriceModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -132,6 +135,7 @@ export default {
       },
       productTotal: null,
       openDetailModal: false,
+      openCostPriceModal: false,
       itemSn: null
     }
   },
@@ -150,6 +154,18 @@ export default {
       this.itemSn = null
       this.openDetailModal = false
     },
+    handleOk (row, type) {
+      queryStockProductCostNull({ checkWarehouseSn: row.checkWarehouseSn }).then(res => {
+        console.log(res)
+        // 设置成本价
+        if (res.data.length) {
+          // 如果有盈亏的产品,没有最近一次入库成本价,需要设置成本价
+          this.setCostPrice(res.data, row)
+        } else {
+          this.handleExamine(row, type)
+        }
+      })
+    },
     //  审核
     handleExamine (row, type) {
       const _this = this
@@ -171,6 +187,13 @@ export default {
         }
       })
     },
+    // 设置成本价
+    setCostPrice (data, row) {
+      this.openCostPriceModal = true
+      this.$nextTick(() => {
+        this.$refs.setPriceModal.setData(data, row)
+      })
+    },
     // 重盘
     handleAgain (row) {
       const _this = this

+ 137 - 0
src/views/financialManagement/inventoryCheckAudit/setPriceModal.vue

@@ -0,0 +1,137 @@
+<template>
+  <a-modal
+    centered
+    class="setPrice-basicInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="title"
+    v-model="isShow"
+    @cancel="cancel"
+    :width="800">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="setPrice-title">
+        <div>以下产品没有成本价,无法进行财务盘点审核!</div>
+        <div>请先设置成本价,然后再审核。</div>
+      </div>
+      <div class="setPrice-table">
+        <a-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record,index) => record.id +'-'+ index"
+          :columns="columns"
+          :data-source="list"
+          :scroll="{ y:400 }"
+          :pagination="false"
+          bordered>
+          <template slot="action" slot-scope="text,record">
+            <a-input-number
+              style="width: 100%;"
+              size="small"
+              v-model="record.lastStockCost"
+              :precision="2"
+              :min="0"
+              :max="999999"
+              placeholder="请输入成本价"
+            />
+          </template>
+        </a-table>
+      </div>
+      <div class="btn-cont">
+        <a-button type="primary" @click="handleSubmit">保存</a-button>
+        <a-button @click="cancel" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { stockWarnSaveBatch } from '@/api/checkWarehouse'
+export default {
+  name: 'SettleModal',
+  components: {},
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: '设置成本价'
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      confirmLoading: false,
+      isShow: this.openModal, //  是否打开弹框
+      row: null,
+      list: [],
+      // 表头
+      columns: [
+        { title: '产品编码', dataIndex: 'productCode', width: '30%', align: 'center', customRender: function (text) { return ((text || text != ' ') ? text : '--') } },
+        { title: '产品名称', dataIndex: 'productName', width: '50%', align: 'center', customRender: function (text) { return (text || '--') } },
+        { title: '成本价', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
+      ]
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      const _this = this
+      const hasEmpty = this.list.filter(item => !item.lastStockCost && item.lastStockCost != 0)
+      if (hasEmpty.length) {
+        this.$message.info('成本价不能为空!')
+        return
+      }
+      const params = []
+      this.list.map(item => {
+        params.push({
+          'id': item.id,
+          'lastStockCost': item.lastStockCost
+        })
+      })
+      stockWarnSaveBatch(params).then(res => {
+        _this.isShow = false
+        _this.$emit('ok', _this.row, true)
+      })
+    },
+    cancel () {
+      this.isShow = false
+    },
+    // 编辑信息
+    setData (data, row) {
+      this.list = data
+      this.row = row
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .setPrice-basicInfo-modal{
+    .setPrice-title{
+      text-align: center;
+      padding-bottom: 20px;
+      line-height: 24px;
+    }
+    .btn-cont{
+      padding: 30px 0 0;
+      text-align: center;
+    }
+  }
+</style>

+ 18 - 12
src/views/financialManagement/warehousingAudit/list.vue

@@ -221,13 +221,13 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.auditTime)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.auditTime)
+      this.queryParam.beginDate = flag ? '' : (getDate.getThreeMonthDays().starttime + ' 00:00:00')
+      this.queryParam.endDate = flag ? '' : (getDate.getCurrMonthDays().endtime + ' 23:59:59')
       this.queryParam.purchaseBillNo = ''
       this.queryParam.receivingBillNo = ''
-      this.queryParam.auditState = 'WAIT_PUT_WAREHOUSE_AUDIT'
+      this.queryParam.auditState = flag ? '' : 'WAIT_PUT_WAREHOUSE_AUDIT'
     },
     pageInit () {
       const _this = this
@@ -258,14 +258,20 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.auditState = this.$route.query.pageParams.auditState
-      }
-      this.pageInit()
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.resetData(true)
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.$refs.table.refresh(true)
+    } else {
+      // 如果是新页签打开
+      if (this.$store.state.app.isNewTab) {
+        this.pageInit()
+        this.resetSearchForm()
+      }
     }
   },
   beforeRouteEnter (to, from, next) {

+ 5 - 4
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -46,7 +46,7 @@
                   </a-col>
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品品牌">
-                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="queryParam.brandSn"></ProductBrand>
+                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" sysFlag="" v-model="queryParam.brandSn"></ProductBrand>
                     </a-form-item>
                   </a-col>
                   <template v-if="advanced">
@@ -90,7 +90,7 @@
           class="sTable"
           ref="table"
           size="small"
-          :rowKey="(record) => record.productSn"
+          :rowKey="(record,index) => record.productSn +'-'+ index"
           rowKeyName="productSn"
           :row-selection="{ columnWidth: 40 }"
           @rowSelection="rowSelectionFun"
@@ -112,7 +112,7 @@
               type="link"
               class="button-primary"
               :disabled="spinning"
-              @click="handleAdd(record)"
+              @click.stop="handleAdd(record)"
               id="inventoryCheckSelfDiskList-add-btn">添加</a-button>
           </template>
         </s-table>
@@ -136,7 +136,7 @@
                   </a-col>
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品品牌">
-                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="chooseQueryParam.brandSn"></ProductBrand>
+                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" sysFlag="" v-model="chooseQueryParam.brandSn"></ProductBrand>
                     </a-form-item>
                   </a-col>
                   <template v-if="chooseAdvanced">
@@ -562,6 +562,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+            event.stopPropagation()
             this.handleAdd(record)
           }
         }

+ 25 - 1
src/views/inventoryManagement/inventoryImport/list.vue

@@ -66,6 +66,14 @@
           style="margin: 0 15px;">导出错误项</a-button>
       </div>
     </a-spin>
+    <common-modal
+      :openModal="openTipsModal"
+      :modalHtml="modalHtml"
+      modalTit="操作提示"
+      okText="确定"
+      :isCancel="false"
+      @ok="openTipsModal=false"
+      @close="openTipsModal=false" />
   </a-card>
 </template>
 
@@ -74,12 +82,15 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, Upload } from '@/components'
 import { stockImportList, stockImportFinish, stockImportCancel, stockImportKCExportError } from '@/api/stockImport'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import commonModal from '@/views/common/commonModal.vue'
 export default {
   name: 'StockImportList',
-  components: { STable, Upload },
+  components: { STable, Upload, commonModal },
   mixins: [commonMixin],
   data () {
     return {
+      openTipsModal: false,
+      modalHtml: '',
       spinning: false,
       exportLoading: false, // 导出loading
       tableHeight: 0,
@@ -95,6 +106,7 @@ export default {
         { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '错误原因', dataIndex: 'errorMsg', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
+      listData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -108,6 +120,11 @@ export default {
             }
             const ret = data.list.filter(item => item.isError == 1)
             this.isAllError = ret.length == data.count
+            this.listData = data.list
+            if (this.uploadData && data.list.length == 0) {
+              this.$message.info('没有可导入数据,请检查模板是否为空')
+              this.resetSearchForm()
+            }
           }
           this.spinning = false
           return data
@@ -151,6 +168,7 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.resetSearchForm()
+              _this.showSuccessModal(res.data)
               _this.spinning = false
             } else {
               _this.spinning = false
@@ -159,6 +177,12 @@ export default {
         }
       })
     },
+    showSuccessModal (data) {
+      if (data) {
+        this.openTipsModal = true
+        this.modalHtml = `<div><div>库存导入成功</div><div>入库类型:库存导入</div><div>库存批次:${data.stockBatchNo}</div><div>总导入款数:${data.productTotalCategory}</div><div>总入库数量:${data.productTotalQty}</div><div>总入库成本:${data.productTotalCost}</div></div>`
+      }
+    },
     // 取消导入
     handleCancel () {
       const _this = this

+ 6 - 3
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -12,8 +12,10 @@
       <!-- 合计 -->
       <a-alert type="info" style="margin-bottom:10px">
         <div class="ftext" slot="message">
-          可用库存总数量(个):<strong>{{ currentStock&&(currentStock.currentStockQty || currentStock.currentStockQty==0) ? currentStock.currentStockQty : '--' }}</strong>;
-          可用库存总成本(¥):<strong>{{ currentStock&&(currentStock.currentStockCost || currentStock.currentStockCost==0) ? currentStock.currentStockCost : '--' }}</strong>。
+          可用库存总数量(个):<strong>{{ currentStock&&(currentStock.currentStockQty || currentStock.currentStockQty==0) ? currentStock.currentStockQty : '--' }}</strong>;
+          可用库存总成本(¥):<strong>{{ currentStock&&(currentStock.currentStockCost || currentStock.currentStockCost==0) ? currentStock.currentStockCost : '--' }}</strong>;
+          冻结库存总数量(个):<strong>{{ currentStock&&(currentStock.freezeQty || currentStock.freezeQty==0) ? currentStock.freezeQty : '--' }}</strong>;
+          冻结库存总成本(¥):<strong>{{ currentStock&&(currentStock.freezeCost || currentStock.freezeCost==0) ? currentStock.freezeCost : '--' }}</strong>。
         </div>
       </a-alert>
       <!-- 库存详情 -->
@@ -74,7 +76,8 @@ export default {
         { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'currentQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '可用库存数量', dataIndex: 'currentQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '冻结库存数量', dataIndex: 'freezeQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '成本单价', dataIndex: 'putCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 4 - 9
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -310,7 +310,6 @@ export default {
         days = '--'
       }
       return days
-      console.log(days, '天数')
     },
     //  重置
     resetSearchForm () {
@@ -325,8 +324,8 @@ export default {
       this.queryParam.productTypeName = undefined
       this.queryParam.zeroQtyFlag = false
       this.productTypeSn = []
-      this.queryParam.minUnsalableDays = undefined, // 滞销天数最小值
-      this.queryParam.maxUnsalableDays = undefined, // 滞销天数最大值
+      this.queryParam.minUnsalableDays = undefined // 滞销天数最小值
+      this.queryParam.maxUnsalableDays = undefined // 滞销天数最大值
       this.$refs.table.refresh(true)
     },
     // 合计
@@ -357,11 +356,7 @@ export default {
     handleExport () {
       const _this = this
       const params = JSON.parse(JSON.stringify(this.queryParam))
-      if (params.zeroQtyFlag) {
-        params.zeroQtyFlag = '0'
-      } else {
-        params.zeroQtyFlag = ''
-      }
+      params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
       params.productEnabledFlag = params.productEnabledFlag ? '' : '1'
       this.exportLoading = true
       _this.spinning = true
@@ -432,7 +427,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      // 是否默认打印原厂编码
+      // 是否默认包括禁用产品
       this.queryParam.productEnabledFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) != 'false'
     },
     setTableH () {

+ 30 - 6
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -12,7 +12,7 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="变动类型">
                   <v-select
                     v-model="queryParam.flowType"
@@ -23,7 +23,7 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="单据类型">
                   <v-select
                     v-model="queryParam.bizType"
@@ -35,6 +35,11 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
+                <a-form-item label="关联单据号">
+                  <a-input id="inventoryQueryWarehouseDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单据号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
                 <a-form-item label="仓库">
                   <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear v-model="queryParam.warehouseSn" >
                     <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
@@ -52,6 +57,17 @@
                     <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
                   </a-form-item>
                 </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="出入库状态">
+                    <v-select
+                      v-model="queryParam.state"
+                      ref="state"
+                      id="warehousingAuditList-state"
+                      code="STOCK_FLOW_STATE"
+                      placeholder="请选择出入库状态"
+                      allowClear></v-select>
+                  </a-form-item>
+                </a-col>
               </template>
               <a-col :md="6" :sm="24">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
@@ -68,7 +84,9 @@
         <a-alert type="info" style="margin-bottom:10px">
           <div class="ftext" slot="message">
             当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.currentStockQty || productTotal.currentStockQty==0)) ? productTotal.currentStockQty : '--' }}</strong>;
-            当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>。
+            当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>;
+            冻结库存总数量(个):<strong>{{ productTotal&&(productTotal.freezeQty || productTotal.freezeQty==0) ? productTotal.freezeQty : '--' }}</strong>;
+            冻结库存总成本(¥):<strong>{{ productTotal&&(productTotal.freezeCost || productTotal.freezeCost==0) ? productTotal.freezeCost : '--' }}</strong>。
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -116,9 +134,11 @@ export default {
         beginDate: '',
         endDate: '',
         bizType: undefined,
+        bizNo: '',
         flowType: undefined,
         unitName: '',
-        warehouseSn: undefined
+        warehouseSn: undefined,
+        state: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -127,6 +147,7 @@ export default {
         { title: '产品名称', dataIndex: 'product.name', width: '12%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'product.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '批次号', dataIndex: 'stockBatchNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位名称', dataIndex: 'unitName', width: '9%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -134,7 +155,8 @@ export default {
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '9%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '数量', scopedSlots: { customRender: 'qty' }, width: '5%', align: 'center' },
         { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出入库状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -189,9 +211,11 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.bizType = undefined
+      this.queryParam.bizNo = ''
       this.queryParam.flowType = undefined
       this.queryParam.unitName = ''
       this.queryParam.warehouseSn = undefined
+      this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
     //  返回列表
@@ -214,7 +238,7 @@ export default {
         _this.setTableH()
       })
       this.getWarehouseList()
-      this.resetSearchForm()
+      this.$refs.table.refresh(true)
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 1 - 1
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -54,7 +54,7 @@
               </a-col>
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="取货单编号">
-                  <a-input placeholder="请输入取货单编号" v-model="queryParam.orderBillNo" allowClear/>
+                  <a-input placeholder="请输入取货单编号" v-model.trim="queryParam.orderBillNo" allowClear/>
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="6" :sm="6" >

+ 17 - 12
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -236,10 +236,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.demanderName = undefined
       this.queryParam.outBizType = undefined
       this.queryParam.state = undefined
@@ -359,15 +359,20 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = JSON.parse(this.$route.query.pageParams).state
-        this.queryParam.outBizType = JSON.parse(this.$route.query.pageParams).outBizType
-      }
-      this.pageInit()
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    this.pageInit()
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.resetData(true)
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.$refs.table.refresh(true)
+    } else {
+      // 如果是新页签打开
+      if (this.$store.state.app.isNewTab) {
+        this.resetSearchForm()
+      }
     }
   },
   beforeRouteEnter (to, from, next) {

+ 206 - 174
src/views/productManagement/productInfo/list.vue

@@ -6,47 +6,23 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码">
-                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-              </a-form-item>
+              <a-form-item label="产品编码"><a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品名称">
-                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
+              <a-form-item label="产品名称"><a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="原厂编码">
-                <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
-              </a-form-item>
+              <a-form-item label="原厂编码"><a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码" /></a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="productInfoList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="productInfoList-productBrandSn" :sysFlag="0" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productInfoList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="productInfoList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -65,9 +41,9 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 id="inventoryQueryList-export">导出</a-button> -->
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced = !advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
+                <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
             </a-col>
           </a-row>
@@ -82,17 +58,20 @@
       <s-table
         class="sTable fixPagination"
         ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
+        :style="{ height: tableHeight + 84.5 + 'px' }"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="record => record.id"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
-        bordered>
+        bordered
+      >
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
-          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-if="record.productTypeName2 || record.productTypeName3">
+            {{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}
+          </span>
           <span v-else>--</span>
         </template>
         <!-- 状态 -->
@@ -103,8 +82,9 @@
             unCheckedChildren="禁用"
             v-if="$hasPermissions('B_product_dealerProduct_enable')"
             @change="changeStatus(record)"
-            :checked="record.enabledFlag == 1 ? true : false" />
-          <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
+            :checked="record.enabledFlag == 1 ? true : false"
+          />
+          <span v-else :style="{ color: record.enabledFlag == 1 ? '#00aa00' : '#999' }">{{ record.enabledFlag == 1 ? '已启用' : '已禁用' }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -114,14 +94,20 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="productInfoList-edit-btn">编辑</a-button>
+            id="productInfoList-edit-btn"
+          >
+            编辑
+          </a-button>
           <a-button
             v-if="$hasPermissions('B_product_dealerProduct_detail')"
             size="small"
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="productInfoList-detail-btn">详情</a-button>
+            id="productInfoList-detail-btn"
+          >
+            详情
+          </a-button>
           <span v-if="!$hasPermissions('B_product_dealerProduct_edit') && !$hasPermissions('B_product_dealerProduct_detail')">--</span>
         </template>
       </s-table>
@@ -132,24 +118,25 @@
 </template>
 
 <script>
-import { commonMixin } from '@/utils/mixin'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
-import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
-import { STable, VSelect } from '@/components'
-import productInfoDetailModal from './detailModal.vue'
-import { downloadExcel } from '@/libs/JGPrint.js'
+import { commonMixin } from '@/utils/mixin';
+import ProductType from '../../common/productType.js';
+import ProductBrand from '../../common/productBrand.js';
+import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct';
+import { STable, VSelect } from '@/components';
+import productInfoDetailModal from './detailModal.vue';
+import { downloadExcel } from '@/libs/JGPrint.js';
 export default {
   name: 'ProductList',
-  components: { STable, VSelect, productInfoDetailModal },
+  components: { STable, VSelect, productInfoDetailModal, ProductType, ProductBrand },
   mixins: [commonMixin],
-  data () {
+  data() {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       productType: [],
-      queryParam: { //  查询条件
+      queryParam: {
+        //  查询条件
         code: '', //  产品编码
         name: '', //  产品名称
         origCode: '', //  原厂编码
@@ -164,200 +151,245 @@ export default {
       exportLoading: false, // 导出loading
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', width: '13%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        {
+          title: '产品编码',
+          dataIndex: 'code',
+          width: '12%',
+          align: 'center',
+          customRender: function(text) {
+            return text || '--';
+          }
+        },
+        {
+          title: '产品名称',
+          dataIndex: 'name',
+          width: '13%',
+          align: 'center',
+          ellipsis: true,
+          customRender: function(text) {
+            return text || '--';
+          }
+        },
+        {
+          title: '原厂编码',
+          dataIndex: 'origCode',
+          width: '11%',
+          align: 'center',
+          customRender: function(text) {
+            return text || '--';
+          }
+        },
+        {
+          title: '产品品牌',
+          dataIndex: 'productBrandName',
+          width: '9%',
+          align: 'center',
+          customRender: function(text) {
+            return text || '--';
+          }
+        },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
-        { title: '经销批发价', dataIndex: 'specialPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        {
+          title: '经销批发价',
+          dataIndex: 'specialPrice',
+          width: '7%',
+          align: 'center',
+          customRender: function(text) {
+            return text || text == 0 ? text : '--';
+          }
+        },
+        {
+          title: '终端价',
+          dataIndex: 'terminalPrice',
+          width: '6%',
+          align: 'center',
+          customRender: function(text) {
+            return text || text == 0 ? text : '--';
+          }
+        },
+        {
+          title: '车主价',
+          dataIndex: 'carOwnersPrice',
+          width: '6%',
+          align: 'center',
+          customRender: function(text) {
+            return text || text == 0 ? text : '--';
+          }
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createDate',
+          width: '7%',
+          align: 'center',
+          customRender: function(text) {
+            return text || '--';
+          }
+        },
         { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
+        this.disabled = true;
+        this.spinning = true;
         return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
-          let data
+          let data;
           if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
+            data = res.data;
+            const no = (data.pageNo - 1) * data.pageSize;
             for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-              const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
-              const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
-              const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
-              data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
+              data.list[i].no = no + i + 1;
+              const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : '';
+              const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : '';
+              const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : '';
+              data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3;
             }
-            this.disabled = false
+            this.disabled = false;
           }
-          this.spinning = false
-          return data
-        })
+          this.spinning = false;
+          return data;
+        });
       },
       openModal: false, //  查看客户详情  弹框
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
       productTypeList: [] //  分类下拉数据
-    }
+    };
   },
   methods: {
     //  重置
-    resetSearchForm () {
-      this.queryParam.code = ''
-      this.queryParam.name = ''
-      this.queryParam.origCode = ''
-      this.queryParam.productBrandSn = undefined
-      this.queryParam.productTypeSn1 = ''
-      this.queryParam.productTypeSn2 = ''
-      this.queryParam.productTypeSn3 = ''
-      this.queryParam.enabledFlag = undefined
-      this.productType = []
-      this.$refs.table.refresh(true)
+    resetSearchForm() {
+      this.queryParam.code = '';
+      this.queryParam.name = '';
+      this.queryParam.origCode = '';
+      this.queryParam.productBrandSn = undefined;
+      this.queryParam.productTypeSn1 = '';
+      this.queryParam.productTypeSn2 = '';
+      this.queryParam.productTypeSn3 = '';
+      this.queryParam.enabledFlag = undefined;
+      this.productType = [];
+      this.$refs.table.refresh(true);
     },
     //  新增/编辑
-    handleEdit (row) {
-      if (row) { //  编辑
-        this.$router.push({ path: `/productManagement/productInfo/edit/${row.id}` })
-      } else { //  新增
-        this.$router.push({ path: '/productManagement/productInfo/add' })
+    handleEdit(row) {
+      if (row) {
+        //  编辑
+        this.$router.push({ path: `/productManagement/productInfo/edit/${row.id}` });
+      } else {
+        //  新增
+        this.$router.push({ path: '/productManagement/productInfo/add' });
       }
     },
     //  批量导入
-    handleImport () {
-
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
+    handleImport() {},
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
     },
     //  详情
-    handleDetail (row) {
-      this.itemId = row.id
-      this.openModal = true
+    handleDetail(row) {
+      this.itemId = row.id;
+      this.openModal = true;
     },
     //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
+    closeModal() {
+      this.itemId = '';
+      this.openModal = false;
     },
     //  产品分类  change
-    changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    changeProductType(val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : '';
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : '';
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : '';
     },
     // 启用 禁用
-    changeStatus (record) {
+    changeStatus(record) {
       if (record.enabledFlag == '1') {
         this.$confirm({
           title: '提示',
           content: '产品被禁用后,不能再销售,确定禁用吗?',
           centered: true,
           onOk: () => {
-            this.setEnable(record)
+            this.setEnable(record);
           }
-        })
+        });
       } else {
-        this.setEnable(record)
+        this.setEnable(record);
       }
     },
     // 启用 禁用
-    setEnable (record) {
+    setEnable(record) {
       const params = {
         id: record.id,
         enabledFlag: record.enabledFlag == 1 ? '0' : '1'
-      }
-      this.spinning = true
+      };
+      this.spinning = true;
       dealerProductUpdate(params).then(res => {
         if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.spinning = false
+          this.$message.success(res.message);
+          this.$refs.table.refresh();
+          this.spinning = false;
         } else {
-          this.$refs.table.refresh()
-          this.spinning = false
+          this.$refs.table.refresh();
+          this.spinning = false;
         }
-      })
+      });
     },
     //  导出
-    handleExport () {
-      this.exportLoading = true
-      this.spinning = true
+    handleExport() {
+      this.exportLoading = true;
+      this.spinning = true;
       dealerProductExport(this.queryParam).then(res => {
-        this.exportLoading = false
-        this.spinning = false
-        downloadExcel(res, '自建产品列表')
-      })
-    },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
+        this.exportLoading = false;
+        this.spinning = false;
+        downloadExcel(res, '自建产品列表');
+      });
     },
-    pageInit () {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-      this.getProductBrand()
-      this.getProductType()
+    pageInit() {
+      const _this = this;
+      this.$nextTick(() => {
+        // 页面渲染完成后的回调
+        _this.setTableH();
+      });
     },
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+    setTableH() {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight;
+      this.tableHeight = window.innerHeight - tableSearchH - 235;
     }
   },
   watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
+    advanced(newValue, oldValue) {
+      const _this = this;
+      this.$nextTick(() => {
+        // 页面渲染完成后的回调
+        _this.setTableH();
+      });
     },
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
+    '$store.state.app.winHeight'(newValue, oldValue) {
+      //  窗口变更时,需同时更改表格高度
+      this.setTableH();
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
+  mounted() {
+    if (!this.$store.state.app.isNewTab) {
+      // 页签刷新时调用
+      this.pageInit();
+      this.resetSearchForm();
     }
   },
-  activated () {
+  activated() {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
+      this.pageInit();
+      this.resetSearchForm();
     }
     // 仅刷新列表,不重置页面
     if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
+      this.pageInit();
+      this.$refs.table.refresh();
     }
   },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
+  beforeRouteEnter(to, from, next) {
+    next(vm => {});
   }
-}
+};
 </script>

+ 5 - 46
src/views/productManagement/productInfoJg/list.vue

@@ -22,31 +22,13 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :dropdownMatchSelectWidth="false"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-select>
               </a-form-item>
             </a-col>
             <!-- <a-col :md="6" :sm="24">
               <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
+              <ProductType id="productInfoList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
               </a-form-item>
             </a-col> -->
             <!-- <a-col :md="6" :sm="24">
@@ -111,14 +93,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { productTypeQuery } from '@/api/productType'
 import { productList, getCurrentDealer } from '@/api/product'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { STable, VSelect } from '@/components'
 // import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   name: 'ProductJgList',
-  components: { STable, VSelect },
+  components: { STable, VSelect, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -160,7 +142,6 @@ export default {
       },
       openModal: false, //  查看客户详情  弹框
       itemId: '', //  当前产品id
-      productBrandList: [], //  品牌下拉数据
       productTypeList: [] //  分类下拉数据
     }
   },
@@ -249,34 +230,12 @@ export default {
 	  // downloadExcel(res, '箭冠产品列表')
       // })
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({ 'sysFlag': '1' }).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.getColumns()
-      this.getProductBrand()
-      this.getProductType()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 34 - 14
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -53,24 +53,40 @@
               <div class="table-page-search-wrapper">
                 <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
                   <a-row :gutter="15">
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="关键词">
-                        <a-input id="purchaseOrderEdit-bundleName" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码/适用车型"/>
-                      </a-form-item>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品编码">
+                        <a-input id="purchaseOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                      </a-form-model-item>
                     </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <ProductBrand id="purchaseOrderEdit-productBrand" v-model="queryParam.productBrandSn"></ProductBrand>
-                      </a-form-item>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品名称">
+                        <a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="原厂编码">
+                        <a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+                      </a-form-model-item>
                     </a-col>
-                    <a-col :md="6" :sm="24">
+                    <a-col :md="4" :sm="24">
                       <a-form-item label="产品分类">
                         <ProductType id="purchaseOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
                       </a-form-item>
                     </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                    <template v-if="advanced">
+                      <a-col :md="4" :sm="24">
+                        <a-form-item label="产品品牌">
+                          <ProductBrand id="purchaseOrderEdit-productBrand" v-model="queryParam.productBrandSn"></ProductBrand>
+                        </a-form-item>
+                      </a-col>
+                    </template>
+                    <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
                       <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
                       <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
+                      <a @click="advanced=!advanced" style="margin:0 30px 0 10px">
+                        {{ advanced ? '收起' : '展开' }}
+                        <a-icon :type="advanced ? 'up' : 'down'"/>
+                      </a>
                     </a-col>
                   </a-row>
                 </a-form>
@@ -273,7 +289,9 @@ export default {
       productType: [],
       queryParam: {
         productBrandSn: undefined,
-        queryWord: '',
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '' //  产品三级分类
@@ -423,10 +441,12 @@ export default {
     resetSearchForm () {
       this.queryParam = {
         productBrandSn: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '', //  产品三级分类
-        queryWord: ''
+        productTypeSn3: '' //  产品三级分类
       }
       this.productType = []
       this.$refs.table.refresh(true)
@@ -559,6 +579,7 @@ export default {
         this.getOrderDetail()
         this.resetPurchaseForm()
         this.resetSearchForm()
+        this.$refs.searchProductCode.focus()
       })
     }
   },
@@ -570,7 +591,6 @@ export default {
   },
   activated () {
     this.showPage = true
-    console.log(this.$store.state.app.isNewTab)
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
       this.pageInit()

+ 41 - 26
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -301,10 +301,10 @@ export default {
       })
     },
     //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetSearchForm (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.orderBundleNo = ''
       this.queryParam.purchaseBillNo = ''
       this.queryParam.purchaseTargetSn = undefined
@@ -312,7 +312,9 @@ export default {
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
       this.queryParam.purchaseBillSource = undefined
-      this.$refs.table.refresh(true)
+      if (!flag) {
+        this.$refs.table.refresh(true)
+      }
     },
     filterOption (input, option) {
       return (
@@ -336,6 +338,39 @@ export default {
       })
       this.openModal = false
       this.getSupperList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetSearchForm(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -353,31 +388,11 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开新建弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
-        vm.openModal = true
-        vm.$store.state.app.isHomeNav = false
-      }
     })
   }
 }

+ 1 - 0
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -315,6 +315,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+			event.stopPropagation()
             this.handleAdd(record)
           }
         }

+ 42 - 24
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -200,10 +200,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseReturnNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
@@ -260,6 +260,9 @@ export default {
               if (res.status == 200) {
                 const data = res.data
                 _this.spinning = false
+                // 重置查询条件
+                _this.resetData()
+                _this.setIsHomeNav(_this.$route.name, null)
                 _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
               } else {
                 _this.spinning = false
@@ -326,6 +329,39 @@ export default {
         _this.setTableH()
       })
       this.getParentDealer()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -343,27 +379,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 6 - 5
src/views/purchasingManagement/purchaseReturnOutSync/edit.vue

@@ -171,7 +171,6 @@
                   v-model="record.qty"
                   :precision="0"
                   :min="1"
-                  :max="record.refundableQty"
                   placeholder="请输入"
                   @blur="e => qtyBlur(e.target.value, record)"
                   style="width: 100%;" />
@@ -306,7 +305,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].qtyBackups = data.list[i].qty
             data.list[i].costBackups = data.list[i].cost
-            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty
+            // data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty + data.list[i].qty
           }
           this.dataSource = data.list
           return data
@@ -387,11 +386,12 @@ export default {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getDetail(true, true)
+          this.getDetail(true, !isEdit)
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
           this.spinning = false
+          row.qty = row.qtyBackups
         }
       })
     },
@@ -400,6 +400,7 @@ export default {
       return {
         on: {
           dblclick: (event) => {
+			event.stopPropagation()
             this.handleAdd(record)
           }
         }
@@ -421,7 +422,7 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(true, true)
+                _this.getDetail(true, false)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -433,7 +434,7 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(true, true)
+                _this.getDetail(true, false)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {

+ 4 - 4
src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue

@@ -298,7 +298,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].qtyBackups = data.list[i].qty
             data.list[i].costBackups = data.list[i].cost
-            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty
+            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty + data.list[i].qty
           }
           this.dataSource = data.list
           return data
@@ -373,7 +373,7 @@ export default {
         if (res.status == 200) {
           this.$message.success(res.message)
 
-          this.getDetail(true, true)
+          this.getDetail(true, !isEdit)
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -407,7 +407,7 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(true, true)
+                _this.getDetail(true, false)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -419,7 +419,7 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(true, true)
+                _this.getDetail(true, false)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {

+ 45 - 29
src/views/purchasingManagement/purchaseReturnOutSync/list.vue

@@ -112,7 +112,7 @@
             type="link"
             class="button-primary"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturn_outSnycEdit')"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="purchaseReturnList-edit-btn">编辑</a-button>
           <a-button
             size="small"
@@ -236,10 +236,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseReturnNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
@@ -272,7 +272,12 @@ export default {
       })
     },
     // 编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ name: row.grabFlag == 1 ? 'purchaseReturnOutSyncGrapEdit' : 'purchaseReturnOutSyncEdit', params: { sn: row.purchaseReturnSn, returnTargetType: row.returnTargetType } })
     },
     // 详情
@@ -327,6 +332,39 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -345,34 +383,12 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开新建弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
-        vm.openModal = true
-        vm.$store.state.app.isHomeNav = false
-      }
     })
   }
 }

+ 10 - 7
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -94,11 +94,11 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="8">
-              <a-form-model-item label="联系手机" prop="contactMobile">
+              <a-form-model-item label="联系手机" prop="consigneeMobile">
                 <a-input
-                  id="chooseCustom-contactMobile"
+                  id="chooseCustom-consigneeMobile"
                   :maxLength="11"
-                  v-model.trim="form.contactMobile"
+                  v-model.trim="form.consigneeMobile"
                   placeholder="请输入联系电话(最多11个字符)"
                   allowClear />
               </a-form-model-item>
@@ -223,7 +223,7 @@ export default {
         buyerName: '', // 客户名称
         buyerSn: undefined, // 客户sn
         consigneeTel: '', //  联系电话
-        contactMobile: '',
+        consigneeMobile: '',
         consigneeName: '', //  联系人
         shippingAddressProvinceSn: undefined, //  省
         shippingAddressProvinceName: '',
@@ -247,7 +247,7 @@ export default {
         buyerSn: [
           { required: true, message: '请选择客户', trigger: ['change', 'blur'] }
         ],
-        contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
+        consigneeMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         shippingAddressProvinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],
@@ -354,8 +354,10 @@ export default {
     },
     //  获取详情
     getDetail () {
+      this.spinning = true
       custFindById({ id: this.custId }).then(res => {
         const data = res.data
+        console.log(res)
         if (res.status == 200 && data) {
           if (data.provinceSn) { this.getArea('city', data.provinceSn) }
           if (data.citySn) { this.getArea('district', data.citySn) }
@@ -363,7 +365,7 @@ export default {
             buyerName: data.customerName, // 客户名称
             buyerSn: data.customerSn, // 客户sn
             consigneeTel: data.contactTel, //  联系电话
-            contactMobile: data.contactMobile,
+            consigneeMobile: data.contactMobile,
             consigneeName: data.contactName, //  联系人
             shippingAddressProvinceSn: data.provinceSn, //  省
             shippingAddressProvinceName: data.provinceName,
@@ -385,6 +387,7 @@ export default {
           this.$refs.ruleForm.resetFields()
         }
         this.$refs.ruleForm.clearValidate()
+        this.spinning = false
       })
     },
     // 保存客户信息
@@ -393,7 +396,7 @@ export default {
         customerName: this.form.buyerName,
         customerSn: this.form.buyerSn,
         contactTel: this.form.consigneeTel, //  联系电话
-        contactMobile: this.form.contactMobile,
+        contactMobile: this.form.consigneeMobile,
         contactName: this.form.consigneeName, //  联系人
         provinceSn: this.form.shippingAddressProvinceSn, //  省
         provinceName: this.form.shippingAddressProvinceName,

+ 7 - 1
src/views/salesManagement/salesQuery/edit.vue

@@ -7,7 +7,13 @@
           <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <a style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">单号:{{ detailData&&detailData.salesBillNo || '--' }}</a>
           <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
-          <a-button id="salesEdit-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button>
+          <a-button
+            id="salesEdit-edit-btn"
+            v-if="detailData&&detailData.salesTragetType != 'DEALER'"
+            size="small"
+            @click="handleEdit"
+            style="margin-left:10px"
+            key="0">编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesPrint')">

+ 43 - 33
src/views/salesManagement/salesQuery/list.vue

@@ -295,10 +295,6 @@ export default {
     handleAdd () {
       this.openModal = true
     },
-    // 选择客户成功
-    chooseCustomOk (data) {
-      this.$router.push({ name: 'salesAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
-    },
     //  审核
     handleEexamine (row) {
       this.auditInfo = row
@@ -353,6 +349,12 @@ export default {
     handleEdit (row) {
       this.$router.push({ name: 'salesEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
     },
+    // 选择客户成功
+    chooseCustomOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
+      this.$router.push({ name: 'salesAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
+    },
     // 删除
     handleDel (row, type) {
       const _this = this
@@ -389,10 +391,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (falg) {
+      this.$refs.rangeDate.resetDate(falg ? '' : this.time)
+      this.queryParam.beginDate = falg ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = falg ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.purchaseBillNo = ''
@@ -435,12 +437,38 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     }
   },
   watch: {
@@ -455,28 +483,10 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-      	this.queryParam.billStatus = this.$route.query.pageParams.billStatus
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开选择客户弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
-        vm.openModal = true
-        vm.$store.state.app.isHomeNav = false
-      }
     })
   }
 }

+ 7 - 63
src/views/salesManagement/salesQuery/queryPart.vue

@@ -27,31 +27,13 @@
           </a-col>
           <a-col :md="4" :sm="24">
             <a-form-model-item label="产品分类">
-              <a-cascader
-                @change="changeProductType"
-                change-on-select
-                v-model="productType"
-                expand-trigger="hover"
-                :options="productTypeList"
-                :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                id="productInfoList-productType"
-                placeholder="请选择产品分类"
-                allowClear />
+              <ProductType id="productInfoList-productType" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="4" :sm="24">
               <a-form-model-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.brandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+                <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.brandSn"></ProductBrand>
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
@@ -153,13 +135,13 @@
           size="small"
           type="link"
           class="button-primary"
-          @click="handleAdd(record)"
+          @click.stop="handleAdd(record)"
           id="productInfoList-edit-btn">添加</a-button>
         <a-button
           size="small"
           type="link"
           class="button-primary"
-          @click="handleDetail(record)"
+          @click.stop="handleDetail(record)"
           id="productInfoList-detail-btn"
           style="margin-left: 5px;">销售记录</a-button>
       </template>
@@ -172,27 +154,19 @@
 </template>
 
 <script>
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
 import { querySumByProductLocation } from '@/api/stock'
 import { warehouseAllList } from '@/api/warehouse'
 import productSalesRecordModal from './productSalesRecordModal.vue'
 import carInfoModal from './carInfoModal.vue'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { STable, VSelect, Upload } from '@/components'
 import { supperCodeByVin, vinCodeParse } from '@/api/sales'
 import defImg from '@/assets/def_img@2x.png'
 export default {
   name: 'QueryPart',
-  components: { STable, VSelect, Upload, productSalesRecordModal, carInfoModal },
+  components: { STable, VSelect, Upload, productSalesRecordModal, carInfoModal, ProductType, ProductBrand },
   props: {
-    // buyerSn: {
-    //   type: [Number, String],
-    //   default: ''
-    // },
-    // priceType: {
-    //   type: [Number, String],
-    //   default: ''
-    // },
     newLoading: Boolean
   },
   data () {
@@ -221,8 +195,6 @@ export default {
         vinCode: [ { len: 17, message: '请输入正确的车架号(VIN)', trigger: 'change' } ]
       },
       disabled: false, //  查询、重置按钮是否可操作
-      productBrandList: [], //  下拉数据
-      productTypeList: [], //  产品分类  下拉数据
       warehouseList: [], // 仓库列表
       vinInfoData: null,
       // 加载数据方法 必须为 Promise 对象
@@ -304,14 +276,6 @@ export default {
     }
   },
   created () {
-    // 产品品牌
-    if (this.productBrandList.length == 0) {
-      this.getProductBrand()
-    }
-    // 产品分类
-    if (this.productTypeList.length == 0) {
-      this.getProductType()
-    }
     // 仓库
     if (this.warehouseList.length == 0) {
       this.getWarehouse()
@@ -486,26 +450,6 @@ export default {
         }
       })
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''

+ 47 - 27
src/views/salesManagement/salesReturn/list.vue

@@ -103,7 +103,7 @@
             v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')"
             type="link"
             class="button-primary"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="salesReturn-edit-btn">编辑</a-button>
           <a-button
             size="small"
@@ -221,7 +221,12 @@ export default {
       })
     },
     // 编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ name: row.grabFlag == 1 ? 'salesReturnGrabEdit' : 'salesReturnEdit', params: { id: row.id, sn: row.salesReturnSn, buyerSn: row.buyerSn } })
     },
     // 详情
@@ -277,10 +282,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.$refs.rangeExamineDate.resetDate()
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
@@ -298,6 +303,39 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -315,30 +353,12 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = this.$route.query.pageParams.state
-      }
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+    })
   }
 }
 </script>

+ 2 - 2
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -469,8 +469,8 @@ export default {
       } else {
         params.salesQty = row.qty
         // 默认仓库
-        params.warehouseLocationSn = '100000000165'
-        params.warehouseSn = '100000000156'
+        // params.warehouseLocationSn = '100000000165'
+        // params.warehouseSn = '100000000156'
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {

+ 1 - 0
src/views/user/Login.vue

@@ -264,6 +264,7 @@ export default {
           const loginParams = { ...values }
           delete loginParams.username
           loginParams[!state.loginType ? 'email' : 'username'] = values.username
+          loginParams.username = loginParams.username.trim()
           loginParams.password = values.password
           // console.log(loginParams, 'loginParams')
           Login(loginParams)

+ 1 - 1
vue.config.js

@@ -198,7 +198,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.105:8503/qpls-md',
+        // target: 'http://192.168.16.151:8503/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,