Ver Fonte

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa há 4 anos atrás
pai
commit
3770c71006
37 ficheiros alterados com 1925 adições e 1692 exclusões
  1. 228 228
      package-lock.json
  2. 1 1
      src/services/funcode/index.ts
  3. 1 1
      src/services/go/ermcp/account/index.ts
  4. 11 1
      src/services/go/ermcp/business-review/index.ts
  5. 20 0
      src/services/go/ermcp/business-review/interface.ts
  6. 34 1
      src/services/proto/accountinfo/index.ts
  7. 63 0
      src/services/proto/accountinfo/interface.ts
  8. 0 1
      src/services/proto/contract/index.ts
  9. 27 34
      src/views/business/plan/components/add/index.vue
  10. 27 34
      src/views/business/plan/components/modify/index.vue
  11. 12 18
      src/views/information/account_info/compoments/add-business/index.vue
  12. 55 66
      src/views/information/account_info/compoments/add-futures/index.vue
  13. 6 0
      src/views/information/account_info/compoments/add-futures/interface.ts
  14. 22 0
      src/views/information/account_info/compoments/add-futures/setup.ts
  15. 32 39
      src/views/information/custom/compoments/add/index.vue
  16. 35 42
      src/views/information/custom/compoments/modify/index.vue
  17. 40 46
      src/views/information/goods/components/add/index.vue
  18. 24 28
      src/views/information/goods/components/hedgingModify/index.vue
  19. 3 0
      src/views/information/goods/components/hedgingModify/interface.ts
  20. 1 3
      src/views/information/goods/components/hedgingModify/setup.ts
  21. 307 312
      src/views/information/goods/components/modify/index.vue
  22. 32 38
      src/views/information/spot-contract/components/add/index.vue
  23. 3 4
      src/views/information/spot-contract/components/check/index.vue
  24. 29 34
      src/views/information/spot-contract/components/modify/index.vue
  25. 143 115
      src/views/information/spot-contract/list/checkpending/index.vue
  26. 139 108
      src/views/information/spot-contract/list/finished/index.vue
  27. 142 111
      src/views/information/spot-contract/list/performance/index.vue
  28. 154 118
      src/views/information/spot-contract/list/unsubmitted/index.vue
  29. 19 31
      src/views/information/warehouse-info/compoments/add/index.vue
  30. 22 28
      src/views/information/warehouse-info/compoments/modify/index.vue
  31. 3 2
      src/views/manage/finance-review/components/fundsAudit/index.vue
  32. 3 2
      src/views/manage/finance-review/components/fundsCancel/index.vue
  33. 3 2
      src/views/manage/finance-review/components/fundsDetail/index.vue
  34. 135 121
      src/views/manage/finance-review/list/funds/index.vue
  35. 130 118
      src/views/manage/finance-review/list/invoice/index.vue
  36. 19 0
      src/views/manage/finance-review/setup.ts
  37. 0 5
      src/views/manage/inventory-review/components/checkoutCancel/index.vue

+ 228 - 228
package-lock.json

@@ -1828,160 +1828,6 @@
         "tslint": "^5.20.1",
         "webpack": "^4.0.0",
         "yorkie": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
-          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "cosmiconfig": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
-          "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "@types/parse-json": "^4.0.0",
-            "import-fresh": "^3.1.0",
-            "parse-json": "^5.0.0",
-            "path-type": "^4.0.0",
-            "yaml": "^1.7.2"
-          }
-        },
-        "deepmerge": {
-          "version": "4.2.2",
-          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
-          "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
-          "dev": true,
-          "optional": true
-        },
-        "fork-ts-checker-webpack-plugin-v5": {
-          "version": "npm:fork-ts-checker-webpack-plugin@5.2.1",
-          "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz",
-          "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "@babel/code-frame": "^7.8.3",
-            "@types/json-schema": "^7.0.5",
-            "chalk": "^4.1.0",
-            "cosmiconfig": "^6.0.0",
-            "deepmerge": "^4.2.2",
-            "fs-extra": "^9.0.0",
-            "memfs": "^3.1.2",
-            "minimatch": "^3.0.4",
-            "schema-utils": "2.7.0",
-            "semver": "^7.3.2",
-            "tapable": "^1.0.0"
-          }
-        },
-        "fs-extra": {
-          "version": "9.1.0",
-          "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
-          "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "at-least-node": "^1.0.0",
-            "graceful-fs": "^4.2.0",
-            "jsonfile": "^6.0.1",
-            "universalify": "^2.0.0"
-          }
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "jsonfile": {
-          "version": "6.1.0",
-          "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
-          "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "graceful-fs": "^4.1.6",
-            "universalify": "^2.0.0"
-          }
-        },
-        "lru-cache": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
-          "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "yallist": "^4.0.0"
-          }
-        },
-        "schema-utils": {
-          "version": "2.7.0",
-          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
-          "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "@types/json-schema": "^7.0.4",
-            "ajv": "^6.12.2",
-            "ajv-keywords": "^3.4.1"
-          }
-        },
-        "semver": {
-          "version": "7.3.5",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
-          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "lru-cache": "^6.0.0"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "universalify": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
-          "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
-          "dev": true,
-          "optional": true
-        }
       }
     },
     "@vue/cli-plugin-vuex": {
@@ -2054,37 +1900,6 @@
         "webpack-merge": "^4.2.2"
       },
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
-          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
         "file-loader": {
           "version": "4.3.0",
           "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.3.0.tgz",
@@ -2094,49 +1909,6 @@
             "loader-utils": "^1.2.3",
             "schema-utils": "^2.5.0"
           }
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.2.0",
-          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
-          "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          },
-          "dependencies": {
-            "loader-utils": {
-              "version": "2.0.0",
-              "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
-              "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
-              "dev": true,
-              "optional": true,
-              "requires": {
-                "big.js": "^5.2.2",
-                "emojis-list": "^3.0.0",
-                "json5": "^2.1.2"
-              }
-            }
-          }
         }
       }
     },
@@ -6332,6 +6104,160 @@
         "worker-rpc": "^0.1.0"
       }
     },
+    "fork-ts-checker-webpack-plugin-v5": {
+      "version": "npm:fork-ts-checker-webpack-plugin@5.2.1",
+      "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz",
+      "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "@babel/code-frame": "^7.8.3",
+        "@types/json-schema": "^7.0.5",
+        "chalk": "^4.1.0",
+        "cosmiconfig": "^6.0.0",
+        "deepmerge": "^4.2.2",
+        "fs-extra": "^9.0.0",
+        "memfs": "^3.1.2",
+        "minimatch": "^3.0.4",
+        "schema-utils": "2.7.0",
+        "semver": "^7.3.2",
+        "tapable": "^1.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "cosmiconfig": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+          "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "@types/parse-json": "^4.0.0",
+            "import-fresh": "^3.1.0",
+            "parse-json": "^5.0.0",
+            "path-type": "^4.0.0",
+            "yaml": "^1.7.2"
+          }
+        },
+        "deepmerge": {
+          "version": "4.2.2",
+          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
+          "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
+          "dev": true,
+          "optional": true
+        },
+        "fs-extra": {
+          "version": "9.1.0",
+          "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+          "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "at-least-node": "^1.0.0",
+            "graceful-fs": "^4.2.0",
+            "jsonfile": "^6.0.1",
+            "universalify": "^2.0.0"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "jsonfile": {
+          "version": "6.1.0",
+          "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+          "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "graceful-fs": "^4.1.6",
+            "universalify": "^2.0.0"
+          }
+        },
+        "lru-cache": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+          "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "yallist": "^4.0.0"
+          }
+        },
+        "schema-utils": {
+          "version": "2.7.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
+          "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "@types/json-schema": "^7.0.4",
+            "ajv": "^6.12.2",
+            "ajv-keywords": "^3.4.1"
+          }
+        },
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "universalify": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+          "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+          "dev": true,
+          "optional": true
+        }
+      }
+    },
     "form-data": {
       "version": "2.3.3",
       "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
@@ -12803,6 +12729,80 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.2.0",
+      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
+      "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.1.tgz",

+ 1 - 1
src/services/funcode/index.ts

@@ -118,7 +118,7 @@ export const funCode: Code = {
     // 信息 - 账户管理 - 期货账户 - 新增/修改
     HedgeOutMainConfigReq: 1900694,///      期货账户新增修改请求
     HedgeOutMainConfigRsp: 1900695,///      期货账户新增修改响应
-    // 信息 - 账户管理 - 期货账户 - 设置
+    // 信息 - 账户管理 - 期货账户 - 设置 (暂时废弃)
     ErmcpBizGroupReq: 1900696,///          期货账户设置请求
     ErmcpBizGroupRsp: 1900697,///          期货账户设置响应
     // 信息 - 账户管理 - 期货账户 - 注销

+ 1 - 1
src/services/go/ermcp/account/index.ts

@@ -49,7 +49,7 @@ export function QueryAccMgrLoginUser(querytype: number): Promise<ErmcpLoginUserE
  * 查询期货公司(新增期货主账户时候查询的期货公司接口) /Ermcp/QueryFuturesCompany
  * @constructor
  */
-export function QueryFuturesCompany(): Promise<ErmcpFuturesCompany> {
+export function QueryFuturesCompany(): Promise<ErmcpFuturesCompany[]> {
     return commonSearch_go('/Ermcp/QueryFuturesCompany', {}).catch((err) => {
         throw new Error(`查询期货公司: ${err.message}`);
     });

+ 11 - 1
src/services/go/ermcp/business-review/index.ts

@@ -2,10 +2,11 @@
 import { getUserId } from '@/services/bus/account';
 import { commonSearch_go } from "@/services/go";
 import {
+    ErmcpTradeConfigTMP,
     QryBusinessDjRsp,
     QryBussinessJsRsp,
     QueryBusinessDjReq,
-    QueryBusinessJsReq
+    QueryBusinessJsReq, QueryTradeConfigTMPReq
 } from "@/services/go/ermcp/business-review/interface";
 
 /**
@@ -38,3 +39,12 @@ export function QueryBusinessDj(req: QueryBusinessDjReq): Promise<QryBusinessDjR
     });
 }
 
+/**
+ * 查询交易模板配置 /Ermcp/QueryTradeConfigTMP
+ */
+export function QueryTradeConfigTMP(req: QueryTradeConfigTMPReq): Promise<ErmcpTradeConfigTMP> {
+    return commonSearch_go('/Ermcp/QueryTradeConfigTMP', req).catch((err) => {
+        throw new Error(`查询交易模板配置: ${err.message}`);
+    });
+}
+

+ 20 - 0
src/services/go/ermcp/business-review/interface.ts

@@ -98,3 +98,23 @@ export interface QryBusinessDjRsp {
     wrstandardname: string;//品类名称
 }
 
+/**
+ * 查询交易模板配置 请求
+ */
+export interface QueryTradeConfigTMPReq {
+    areauserid?: number
+}
+
+export interface ErmcpTradeConfigTMP {
+    areauserid      :number;//所属机构
+    basiccurrencyid :number;//基本币种ID[汇率] - 目标币种
+    mainaccountid   :number;//主账户ID
+    modifierid      :number;//修改人
+    remark  :string;//备注
+    tradeconfigtmpid        :number;//交易配置模板ID(SEQ_TRADECONFIGTMP)
+    tradeconfigtmpname      :string;//交易配置模板名称
+    tradeconfigtmptype      :number;//交易配置模板类型 - 1:保证金 2:手续费 3:汇率
+    updatetime      :string;//更新时间
+}
+
+

+ 34 - 1
src/services/proto/accountinfo/index.ts

@@ -1,10 +1,18 @@
 import { getUserId } from "@/services/bus/account";
 import { getLongTypeLoginID } from "@/services/bus/login";
 import {
-    ErmcpBizGroupReq, ErmcpBizGroupRsp, LoginaccountOperateReq,
+    ErmcpBizGroupReq,
+    ErmcpBizGroupRsp,
+    HedgeOutMainConfigReq,
+    HedgeOutMainConfigRsp,
+    LoginaccountOperateReq,
     LoginaccountOperateRsp,
     ManagerRoleOperateReq,
     ManagerRoleOperateRsp,
+    TaaccountOperateReq,
+    TaaccountOperateRsp,
+    TaaccountTransfersxmoneyReq,
+    TaaccountTransfersxmoneyRsp,
     UserInfoCheckMangeReq,
     UserInfoCheckMangeRsp
 } from "@/services/proto/accountinfo/interface";
@@ -46,3 +54,28 @@ export const loginAccountOperate = (param: LoginaccountOperateReq): Promise<Logi
 export const bizGroupReq = (param: ErmcpBizGroupReq): Promise<ErmcpBizGroupRsp> => {
     return protoMiddleware<ErmcpBizGroupReq>(param, 'ErmcpBizGroupReq', 'ErmcpBizGroupRsp', 2)
 }
+
+/**
+ * 期货账户新增修改请求
+ * @param param
+ */
+export const hedgeOutMainReq = (param: HedgeOutMainConfigReq): Promise<HedgeOutMainConfigRsp> => {
+    return protoMiddleware<HedgeOutMainConfigReq>(param, 'HedgeOutMainConfigReq', 'HedgeOutMainConfigRsp', 2)
+}
+
+/**
+ * 期货账户注销
+ * @param param
+ */
+export const taAccountOperateReq = (param: TaaccountOperateReq): Promise<TaaccountOperateRsp> => {
+    return protoMiddleware<TaaccountOperateReq>(param, 'TaaccountOperateReq', 'TaaccountOperateRsp', 2)
+}
+
+/**
+ * 期货账户授信
+ * @param param
+ */
+export const taAccountTransfersXMoneyReq = (param: TaaccountTransfersxmoneyReq): Promise<TaaccountTransfersxmoneyRsp> => {
+    return protoMiddleware<TaaccountTransfersxmoneyReq>(param, 'TaaccountTransfersxmoneyReq', 'TaaccountTransfersxmoneyRsp', 2)
+}
+

+ 63 - 0
src/services/proto/accountinfo/interface.ts

@@ -86,4 +86,67 @@ export interface ErmcpBizGroupRsp {
 // 期货账户分组账户 0 29 148
 export interface ErmcpBizGroupTAAccount {
     AccountID: number; // uint64 账户ID
+}
+
+// 期货账户新增修改请求 0 29 146
+export interface HedgeOutMainConfigReq {
+    marketid: number; // uint64 内部市场ID(HedgeOutMainConfig)
+    hedgeaccountcode: string ; // string 对冲账号ID(HedgeOutMainConfig)
+    connectflag: number; // int32 是否联接外部交易 - 0:不连接 1:连接(HedgeOutMainConfig)
+    hedgeaccountpwd: string; // string 对冲账号密码(HedgeOutMainConfig)
+    appid: string; // string AppID(HedgeOutMainConfig)
+    authcode: string; // string 授权码(HedgeOutMainConfig)
+    limitnumber: number; // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
+    status: number; // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
+    accountname: string; // string 账户名称accountname1(Taaccount)
+    accountid: number; // uint64 资金账户ID(Taaccount)
+    taaccounttype: number; // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
+    currencyid: number; // int32 货币ID默认为1(Taaccount)
+    outthreshold: number; // double 出金阈值默认为0(Taaccount)
+    ismain: number; // int32 是否母账号 0:不是母账户 1:是母账户(Taaccount)
+    parentaccountid: number; // uint64 所属根账号(Taaccount)
+    relateduserid: number; // uint64 关联用户(Taaccount)
+    fromaccountid: number; // uint64 所属上级账户(Taaccount)
+    trademargintmpid: number; // uint64 保证金模板id(TAACCOUNTCONFIG)
+    tradefeetmpid: number; // uint64 手续费模板ID(TAACCOUNTCONFIG)
+    maxsubaccouts: number; // uint64 最大子账户数[最大99999][外部母账户用 默认0(TAACCOUNTCONFIG)
+    fcid: number; // uint64 期货公司
+    creatorid: number; // uint64 创建人
+    modifierid: number; // uint64 修改人
+    areauserid: number; // uint64 机构用户ID
+}
+// 期货账户新增修改响应 0 29 157
+export interface HedgeOutMainConfigRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    BizGroupID: number; // uint64 分组ID
+    accountid: number; // uint64 资金账户ID(Taaccount)
+}
+
+// 期货账户注销 0 29 158
+export interface TaaccountOperateReq {
+    accountid: number; // uint64 期货账户ID
+    tradestatus: number; // uint32 7注销
+    modifierid: number; // uint64 修改人
+    areauserid: number; // uint64 机构用户ID
+}
+// 期货账户注销操作响应 0 29 159
+export interface TaaccountOperateRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    accountid: number; // uint64 期货账户ID
+}
+
+// 期货账户授信 0 29 160
+export interface TaaccountTransfersxmoneyReq {
+    accountid: number; // uint64 期货账户ID
+    sxmoney: number;// double 授信金额正为加负为减
+    modifierid: number;// uint64 修改人
+    areauserid: number;// uint64 机构用户ID
+}
+// 期货账户授信操作响应 0 29 161
+export interface TaaccountTransfersxmoneyRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    accountid: number; // uint64 期货账户ID
 }

+ 0 - 1
src/services/proto/contract/index.ts

@@ -27,7 +27,6 @@ export const contractOperateApply = (param: ContractOperateApplyReq): Promise<an
     const obj = {
         OperateSrc: 2,
         OperatorID: Number(getLongTypeLoginID()),
-        ClientTicket: getUUID(),
         OperateApplyID: getTimeValue()
     }
     Object.assign(param, obj)

+ 27 - 34
src/views/business/plan/components/add/index.vue

@@ -143,21 +143,20 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, toRaw } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { formatTime, initData } from '@/common/methods/index';
 import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { getMiddleGoodsD, handleForm, handleTrader } from '../setup';
-import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
-import { FormState } from '@/views/information/spot-contract/components/interface';
 import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
-import APP from '@/services';
 import { hedgePlanReq } from '@/services/proto/hedgeplan';
 import { getAreaUserId } from '@/services/bus/user';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { validateAction } from '@/common/setup/form';
+import { FormState } from '../interface';
 
 export default defineComponent({
     name: 'add-custom',
@@ -176,37 +175,31 @@ export default defineComponent({
 
         const loading = ref<boolean>(false);
         function submit(OperateType: 1 | 2) {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const loginId = getLongTypeLoginID() as LongType;
-                    const userid = getAreaUserId();
-                    const reqParam: ErmcpHedgePlanReq = {
-                        HedgePlanNo: param.HedgePlanNo, // 计划类型
-                        ContractType: param.ContractType, // 计划类型
-                        DeliveryGoodsID: Number(param.DeliveryGoodsID),
-                        WRStandardID: Number(param.WRStandardID), // 现货品种
-                        PlanQty: Number(param.PlanQty), // 计划数量
-                        OperateType: OperateType,
-                        Currencyid: param.Currencyid,
-                        ConvertFactor: param.ConvertFactor,
-                        ApplyId: Number(loginId),
-                        PlanTime: formatTime(new Date(), 's'),
-                        ProductType: 1,
-                        Biztype: 1,
-                        AreaUserID: userid,
-                        Remark: param.Remark,
-                        Tradeuserid: param.Tradeuserid, // 交易用户id
-                    };
-                    requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['提交申请成功', '提交申请失败:']).then(() => {
-                        context.emit('refresh');
-                        cancel();
-                    });
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const loginId = getLongTypeLoginID() as LongType;
+                const userid = getAreaUserId();
+                const reqParam: ErmcpHedgePlanReq = {
+                    HedgePlanNo: param.HedgePlanNo, // 计划类型
+                    ContractType: param.ContractType, // 计划类型
+                    DeliveryGoodsID: Number(param.DeliveryGoodsID),
+                    WRStandardID: Number(param.WRStandardID), // 现货品种
+                    PlanQty: Number(param.PlanQty), // 计划数量
+                    OperateType: OperateType,
+                    Currencyid: param.Currencyid,
+                    ConvertFactor: param.ConvertFactor,
+                    ApplyId: Number(loginId),
+                    PlanTime: formatTime(new Date(), 's'),
+                    ProductType: 1,
+                    Biztype: 1,
+                    AreaUserID: userid,
+                    Remark: param.Remark,
+                    Tradeuserid: param.Tradeuserid, // 交易用户id
+                };
+                requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['提交申请成功', '提交申请失败:']).then(() => {
+                    context.emit('refresh');
+                    cancel();
                 });
+            });
         }
         initData(() => {
             getDG();

+ 27 - 34
src/views/business/plan/components/modify/index.vue

@@ -140,23 +140,22 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { formatTime, initData } from '@/common/methods/index';
 import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { getMiddleGoodsD, handleForm, handleTrader } from '../setup';
-import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
-import { FormState } from '@/views/information/spot-contract/components/interface';
+import { FormState } from '../interface';
 import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
-import APP from '@/services';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
 import { getAreaUserId } from '@/services/bus/user';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hedgePlanReq } from '@/services/proto/hedgeplan';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'plan_uncommitted_modify',
@@ -189,37 +188,31 @@ export default defineComponent({
             }
         });
         function submit(OperateType: 1 | 2) {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const loginId = getLongTypeLoginID() as LongType;
-                    const userid = getAreaUserId();
-                    const reqParam: ErmcpHedgePlanReq = {
-                        HedgePlanNo: param.HedgePlanNo, // 计划类型
-                        ContractType: param.ContractType, // 计划类型
-                        DeliveryGoodsID: Number(param.DeliveryGoodsID),
-                        WRStandardID: Number(param.WRStandardID), // 现货品种
-                        PlanQty: Number(param.PlanQty), // 计划数量
-                        OperateType: OperateType,
-                        ConvertFactor: param.ConvertFactor,
-                        Currencyid: param.Currencyid,
-                        ApplyId: Number(loginId),
-                        PlanTime: formatTime(new Date(), 's'),
-                        ProductType: 1,
-                        Biztype: 1,
-                        AreaUserID: userid,
-                        Remark: param.Remark,
-                        Tradeuserid: param.Tradeuserid, // 交易用户id
-                    };
-                    requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, ['修改计划成功', '修改计划失败:']).then(() => {
-                        context.emit('refresh');
-                        cancel();
-                    });
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const loginId = getLongTypeLoginID() as LongType;
+                const userid = getAreaUserId();
+                const reqParam: ErmcpHedgePlanReq = {
+                    HedgePlanNo: param.HedgePlanNo, // 计划类型
+                    ContractType: param.ContractType, // 计划类型
+                    DeliveryGoodsID: Number(param.DeliveryGoodsID),
+                    WRStandardID: Number(param.WRStandardID), // 现货品种
+                    PlanQty: Number(param.PlanQty), // 计划数量
+                    OperateType: OperateType,
+                    ConvertFactor: param.ConvertFactor,
+                    Currencyid: param.Currencyid,
+                    ApplyId: Number(loginId),
+                    PlanTime: formatTime(new Date(), 's'),
+                    ProductType: 1,
+                    Biztype: 1,
+                    AreaUserID: userid,
+                    Remark: param.Remark,
+                    Tradeuserid: param.Tradeuserid, // 交易用户id
+                };
+                requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, ['修改计划成功', '修改计划失败:']).then(() => {
+                    context.emit('refresh');
+                    cancel();
                 });
+            });
         }
         initData(() => {
             getDG();

+ 12 - 18
src/views/information/account_info/compoments/add-business/index.vue

@@ -77,12 +77,12 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, toRaw, watchEffect } from 'vue';
-import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { defineComponent, ref, watchEffect } from 'vue';
 import { handleBusinessForm } from '../setup';
 import { BusinessFormState } from '../interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'add-business-info',
@@ -104,23 +104,17 @@ export default defineComponent({
             }
         });
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const reqParam = {
-                        operatetype: 1,
-                    };
-                    delete param.userid;
-                    Object.assign(reqParam, param);
-                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                })
-                .catch((error: ValidateErrorEntity<BusinessFormState>) => {
-                    console.log('error', error);
+            validateAction<BusinessFormState>(formRef, formState).then((param) => {
+                const reqParam = {
+                    operatetype: 1,
+                };
+                delete param.userid;
+                Object.assign(reqParam, param);
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
         return {
             formState,

+ 55 - 66
src/views/information/account_info/compoments/add-futures/index.vue

@@ -20,46 +20,49 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="期货公司"
-                       name="userinfotype">
+                       name="fcid">
             <a-select class="inlineFormSelect"
                       style="width: 200px"
+                      v-model:value="formState.fcid"
                       placeholder="请选择期货公司">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option :value="item.fcid"
+                               :key="item.fcid"
+                               v-for="item in companyList">{{item.fcname}}
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="">
+                       name="accountname">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.accountname"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="期货登录账号"
-                       name="">
+                       name="name">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.name"
                      placeholder="请输入期货登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="登录密码"
-                       name="">
+                       name="password">
             <a-input-password class="dialogInput"
                               style="width: 200px"
+                              v-model:value="formState.password"
                               placeholder="请输入登录密码" />
           </a-form-item>
         </a-col>
         <a-col :span="24">
           <a-form-item label="指定交易用户"
                        name="">
-            <a-select class="inlineFormSelect"
-                      style="width: 200px"
-                      placeholder="请选择指定交易用户">
-              <a-select-option value="权限一">权限一</a-select-option>
-            </a-select>
+            <span>{{getUserName()}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -69,14 +72,16 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
-import { defineComponent, ref, reactive, toRaw, UnwrapRef, watchEffect } from 'vue';
-import { AllEnums } from '@/services/go/commonService/interface';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { bizGroupReq, loginAccountOperate } from '@/services/proto/accountinfo';
-import { ErmcpBizGroupReq, ErmcpBizGroupTAAccount } from '@/services/proto/accountinfo/interface';
-import { ErmcpBizGroupSpotGoods } from '@/services/go/ermcp/account/interface';
+import { defineComponent, ref, watchEffect } from 'vue';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { hedgeOutMainReq } from '@/services/proto/accountinfo';
+import { ErmcpBizGroupReq } from '@/services/proto/accountinfo/interface';
+import { ErmcpFuturesCompany } from '@/services/go/ermcp/account/interface';
+import { QueryFuturesCompany } from '@/services/go/ermcp/account';
+import { getUserName } from '@/services/bus/user';
+import { handleBusinessForm } from './setup';
+import { validateAction } from '@/common/setup/form';
+import { FormState } from './interface';
 
 export default defineComponent({
     name: 'add-custom',
@@ -85,62 +90,46 @@ export default defineComponent({
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_add');
         const loading = ref<boolean>(false);
-        // 证件类型
-        // const cardTypeList = ref<AllEnums[]>(getCardType());
-        // // 表单
-        // const formRef = ref();
-        // const formState: UnwrapRef<FormState> = reactive(initFormState());
-        // const rules = {
-        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
-        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
-        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
-        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
-        // };
-        // // 下单方法
-        // const { loading, applyAction } = handleApply();
-        // function isPersonal(): boolean {
-        //     return formState.userinfotype === '1';
-        // }
+        const companyList = ref<ErmcpFuturesCompany[]>([]);
+        const { rules, formState, formRef } = handleBusinessForm();
+        watchEffect(() => {
+            if (visible.value) {
+                queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
+                    companyList.value = res;
+                });
+            }
+        });
 
         function submit() {
-            let reqParam: ErmcpBizGroupReq = {
-                // BizGroupID: number; // uint64 分组ID(修改/删除必填)
-                // BizType: number; // int32 业务类型 - 1:套保 2:套利
-                // Remark: string; // string 新增/修改备注
-                // ApplySrc: number; // int32 新增/修改来源 - 1:管理端 2:终端
-                // ApplyId: number; // uint64 新增/修改人
-                // SpotGoods: ErmcpBizGroupSpotGoods[]; // ErmcpBizGroupSpotGoods 期货账户分组商品
-                // TAAccount: ErmcpBizGroupTAAccount[]; // ErmcpBizGroupTAAccount 期货账户分组账户
-                // OptType: number; // int32 操作类型 - 1:新增 2:修改 3:删除
-                // AreaUserID: number; // uint64 所属机构
-            };
+            validateAction<FormState>(formRef, formState).then((res) => {
+                let reqParam: ErmcpBizGroupReq = {
+                    // BizGroupID: number; // uint64 分组ID(修改/删除必填)
+                    // BizType: number; // int32 业务类型 - 1:套保 2:套利
+                    // Remark: string; // string 新增/修改备注
+                    // ApplySrc: number; // int32 新增/修改来源 - 1:管理端 2:终端
+                    // ApplyId: number; // uint64 新增/修改人
+                    // SpotGoods: ErmcpBizGroupSpotGoods[]; // ErmcpBizGroupSpotGoods 期货账户分组商品
+                    // TAAccount: ErmcpBizGroupTAAccount[]; // ErmcpBizGroupTAAccount 期货账户分组账户
+                    // OptType: number; // int32 操作类型 - 1:新增 2:修改 3:删除
+                    // AreaUserID: number; // uint64 所属机构
+                };
 
-            requestResultLoadingAndInfo(bizGroupReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
-                cancel();
-                // context.emit('refresh');
+                requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
+                    cancel();
+                    // context.emit('refresh');
+                });
             });
-
-            // formRef.value
-            //     .validate()
-            //     .then(() => {
-            //         const param = toRaw(formState);
-            //         applyAction(param);
-            //         console.log('values', formState);
-            //     })
-            //     .catch((error: ValidateErrorEntity<FormState>) => {
-            //         console.log('error', error);
-            //     });
         }
         return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            formState,
+            rules,
+            formRef,
             visible,
             cancel,
-            // submit,
-            // loading,
+            companyList,
+            getUserName,
+            submit,
+            loading,
         };
     },
 });

+ 6 - 0
src/views/information/account_info/compoments/add-futures/interface.ts

@@ -0,0 +1,6 @@
+export interface FormState {
+    fcid: number | undefined; // uint64 期货公司
+    accountname: string; // string 账户名称accountname1(Taaccount)
+    name: string;
+    password: string;
+}

+ 22 - 0
src/views/information/account_info/compoments/add-futures/setup.ts

@@ -0,0 +1,22 @@
+import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from './interface';
+/**
+ * 表单
+ * @returns 
+ */
+export function handleBusinessForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        name: '',
+        accountname: '',
+        password: '',
+        fcid: undefined,
+    })
+    const rules = {
+        accountname: [{ required: true, message: '请输入账户名称', trigger: 'blur' }],
+        password: [{ required: true, message: '请输入账户密码', trigger: 'blur' }],
+        name: [{ required: true, message: '请输入期货登录账号', trigger: 'blur' }],
+        fcid: [{ required: true, message: '请选择期货公司' }],
+    }
+    return { rules, formState, formRef }
+}

+ 32 - 39
src/views/information/custom/compoments/add/index.vue

@@ -276,16 +276,16 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, toRaw } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { getCardType, handleForm } from './setup';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { FormState } from './interface';
-import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
 import { getAddress } from '@/services/go/adress';
 import { AddUserInfoApplyReq } from '@/services/go/ermcp/customInfo/interface';
 import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryAddUserInfoApply } from '@/services/go/ermcp/customInfo';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'add-custom',
@@ -306,45 +306,38 @@ export default defineComponent({
         }
 
         function submit(OperateType: 1 | 2) {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const reqParam: AddUserInfoApplyReq = {
-                        customername: param.customername, // 必填
-                        userid: 1, // 写死 必填
-                        memberareaid: getUserId(),
-                        userinfotype: Number(param.userinfotype),
-                        username: param.customername,
-                        userstate: OperateType, // 1: 保存草稿 2: 新增
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const reqParam: AddUserInfoApplyReq = {
+                    customername: param.customername, // 必填
+                    userid: 1, // 写死 必填
+                    memberareaid: getUserId(),
+                    userinfotype: Number(param.userinfotype),
+                    username: param.customername,
+                    userstate: OperateType, // 1: 保存草稿 2: 新增
 
-                        // 以上必填
-                        cardtype: param.cardtype, // 证件类型
-                        cardnum: param.cardnum, // 证件号码
-                        nickname: param.nickname, // 昵称
-                        remark: param.remark, // 备注
-                        mobilephone: param.mobilephone, //  手机号码
-                        telphone: param.telphone, // 电话
-                        cardfrontphotourl: param.cardfrontphotourl, // 正面照片
-                        cardaddress: param.cardaddress, // 证件地址
-                        cityid: param.cityid, //
-                        districtid: param.districtid, // 地区
-                        // countryid: param.,9
-                        provinceid: param.provinceid, //省
-                        contactname: param.contactname, // 联系人
-                        legalpersonname: param.legalpersonname, // 法人姓名(企业)
-                        taxpayernum: param.taxpayernum, // 纳税人识别号
-                        email: param.email, // email
-                    };
-                    requestResultLoadingAndInfo(QueryAddUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['修改客户资料成功', '修改客户资料失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                    console.log('values', formState);
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+                    // 以上必填
+                    cardtype: param.cardtype, // 证件类型
+                    cardnum: param.cardnum, // 证件号码
+                    nickname: param.nickname, // 昵称
+                    remark: param.remark, // 备注
+                    mobilephone: param.mobilephone, //  手机号码
+                    telphone: param.telphone, // 电话
+                    cardfrontphotourl: param.cardfrontphotourl, // 正面照片
+                    cardaddress: param.cardaddress, // 证件地址
+                    cityid: param.cityid, //
+                    districtid: param.districtid, // 地区
+                    // countryid: param.,9
+                    provinceid: param.provinceid, //省
+                    contactname: param.contactname, // 联系人
+                    legalpersonname: param.legalpersonname, // 法人姓名(企业)
+                    taxpayernum: param.taxpayernum, // 纳税人识别号
+                    email: param.email, // email
+                };
+                requestResultLoadingAndInfo(QueryAddUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['修改客户资料成功', '修改客户资料失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
         return {
             formState,

+ 35 - 42
src/views/information/custom/compoments/modify/index.vue

@@ -276,17 +276,17 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { getCardType, handleForm, initFormState } from '../add/setup';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { FormState } from '../add/interface';
-import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
 import { getAddress } from '@/services/go/adress';
 import { ModifyUserInfoApplyReq, QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryModifyUserInfoApply } from '@/services/go/ermcp/customInfo';
 import { mergeTwoObj } from '@/utils/objHandle';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'modify-custom',
@@ -311,12 +311,12 @@ export default defineComponent({
             return formState.userinfotype === '1';
         }
 
-        const userid = ref<number>(0)
-        const countryid = ref<number>(0)
+        const userid = ref<number>(0);
+        const countryid = ref<number>(0);
         watchEffect(() => {
             if (visible.value) {
-                userid.value = props.selectedRow.userid
-                countryid.value = props.selectedRow.countryid
+                userid.value = props.selectedRow.userid;
+                countryid.value = props.selectedRow.countryid;
                 mergeTwoObj(formState, props.selectedRow);
                 const { provinceid, cityid } = props.selectedRow;
                 provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
@@ -324,43 +324,36 @@ export default defineComponent({
             }
         });
         function submit(OperateType: 1 | 2) {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const reqParam: ModifyUserInfoApplyReq = {
-                        customername: param.customername, // 必填
-                        userid: userid.value,
-                        memberareaid: getUserId(),
-                        userinfotype: Number(param.userinfotype),
-                        username: param.customername,
-                        userstate: OperateType, // 1: 保存草稿 2: 新增
-                        cardtype: param.cardtype, // 证件类型
-                        cardnum: param.cardnum, // 证件号码
-                        nickname: param.nickname, // 昵称
-                        remark: param.remark, // 备注
-                        mobilephone: param.mobilephone, //  手机号码
-                        telphone: param.telphone, // 电话
-                        cardfrontphotourl: param.cardfrontphotourl, // 正面照片
-                        cardaddress: param.cardaddress, // 证件地址
-                        cityid: param.cityid, //
-                        districtid: param.districtid, // 地区
-                        countryid: countryid.value,
-                        provinceid: param.provinceid, //省
-                        contactname: param.contactname, // 联系人
-                        legalpersonname: param.legalpersonname, // 法人姓名(企业)
-                        taxpayernum: param.taxpayernum, // 纳税人识别号
-                        email: param.email, // email
-                    };
-                    requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                    console.log('values', formState);
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const reqParam: ModifyUserInfoApplyReq = {
+                    customername: param.customername, // 必填
+                    userid: userid.value,
+                    memberareaid: getUserId(),
+                    userinfotype: Number(param.userinfotype),
+                    username: param.customername,
+                    userstate: OperateType, // 1: 保存草稿 2: 新增
+                    cardtype: param.cardtype, // 证件类型
+                    cardnum: param.cardnum, // 证件号码
+                    nickname: param.nickname, // 昵称
+                    remark: param.remark, // 备注
+                    mobilephone: param.mobilephone, //  手机号码
+                    telphone: param.telphone, // 电话
+                    cardfrontphotourl: param.cardfrontphotourl, // 正面照片
+                    cardaddress: param.cardaddress, // 证件地址
+                    cityid: param.cityid, //
+                    districtid: param.districtid, // 地区
+                    countryid: countryid.value,
+                    provinceid: param.provinceid, //省
+                    contactname: param.contactname, // 联系人
+                    legalpersonname: param.legalpersonname, // 法人姓名(企业)
+                    taxpayernum: param.taxpayernum, // 纳税人识别号
+                    email: param.email, // email
+                };
+                requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
         return {
             formState,

+ 40 - 46
src/views/information/goods/components/add/index.vue

@@ -276,19 +276,20 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, toRaw, watchEffect } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
 import { handleFromState, handleGoodsGroup } from './setup';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { RuleObject } from 'ant-design-vue/es/form/interface';
 import { FormState, WRSConvertDetailEx } from './interface';
 import { validateCommon } from '@/common/setup/validate';
 import { getGoodsUnitEnumList } from '@/common/constants/enumsList';
 import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
-import {DeliveryGoodsApplyReq} from "@/services/proto/delivery/interface";
-import {addDeliveryGoodsApply} from "@/services/proto/delivery";
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { DeliveryGoodsApplyReq } from '@/services/proto/delivery/interface';
+import { addDeliveryGoodsApply } from '@/services/proto/delivery';
+import { validateAction } from '@/common/setup/form';
 
 /**
  * 检验单位
@@ -318,48 +319,41 @@ export default defineComponent({
         // 单位列表
         const unitList = getGoodsUnitEnumList();
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const unitid = param.unitid === undefined ? 0 : param.unitid
-                    const reqParam: DeliveryGoodsApplyReq = {
-                        deliverygoodscode: param.deliverygoodscode,
-                        deliverygoodsname: param.deliverygoodsname,
-                        unitid: unitid,
-                        type: 1,
-                        remark: param.remark,
-                        gldwrstandards: param.gldwrstandards.map(value => {
-                            const gldunitid = value.unitid === undefined ? 0 : value.unitid
-                            const convertfactors: any = value.convertfactor === null ? 0 : value.convertfactor
-                            return {
-                                wrstandardid: value.wrstandardid,
-                                wrstandardname: value.wrstandardname,
-                                unitid: gldunitid,
-                                convertfactor: (convertfactors as string) ? Number(convertfactors) : convertfactors
-                            }
-                        }),
-                        glddgfactoryItems: param.glddgfactoryItems,
-                        wrsconvertdetails: param.wrsconvertdetails.map(value => {
-                            const middlegoodsid = value.middlegoodsid === undefined ? 0 : value.middlegoodsid
-                            const convertratio: any = value.convertratio === null ? 0 : value.convertratio
-                            const wrsunitid = value.unitid === null ? 0 : value.unitid
-                            return {
-                                middlegoodsid: middlegoodsid,
-                                convertratio: (convertratio as string) ? Number(convertratio) : convertratio,
-                                unitid: wrsunitid
-                            }
-                        })
-                    }
-                    requestResultLoadingAndInfo(addDeliveryGoodsApply, reqParam, loading, ['新增现货品种成功', '新增现货品种失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                    console.log('param', param);
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const unitid = param.unitid === undefined ? 0 : param.unitid;
+                const reqParam: DeliveryGoodsApplyReq = {
+                    deliverygoodscode: param.deliverygoodscode,
+                    deliverygoodsname: param.deliverygoodsname,
+                    unitid: unitid,
+                    type: 1,
+                    remark: param.remark,
+                    gldwrstandards: param.gldwrstandards.map((value) => {
+                        const gldunitid = value.unitid === undefined ? 0 : value.unitid;
+                        const convertfactors: any = value.convertfactor === null ? 0 : value.convertfactor;
+                        return {
+                            wrstandardid: value.wrstandardid,
+                            wrstandardname: value.wrstandardname,
+                            unitid: gldunitid,
+                            convertfactor: (convertfactors as string) ? Number(convertfactors) : convertfactors,
+                        };
+                    }),
+                    glddgfactoryItems: param.glddgfactoryItems,
+                    wrsconvertdetails: param.wrsconvertdetails.map((value) => {
+                        const middlegoodsid = value.middlegoodsid === undefined ? 0 : value.middlegoodsid;
+                        const convertratio: any = value.convertratio === null ? 0 : value.convertratio;
+                        const wrsunitid = value.unitid === null ? 0 : value.unitid;
+                        return {
+                            middlegoodsid: middlegoodsid,
+                            convertratio: (convertratio as string) ? Number(convertratio) : convertratio,
+                            unitid: wrsunitid,
+                        };
+                    }),
+                };
+                requestResultLoadingAndInfo(addDeliveryGoodsApply, reqParam, loading, ['新增现货品种成功', '新增现货品种失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
 
         // 表单

+ 24 - 28
src/views/information/goods/components/hedgingModify/index.vue

@@ -63,17 +63,18 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref, toRaw } from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import { initMG } from '../../list/hedging-variety/setup';
 import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
 import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
 import { handleForm } from './setup';
-import {deliveryGoodsCancel, ermsMiddelGoodsEdit} from '@/services/proto/delivery';
-import { message } from 'ant-design-vue';
+import { ermsMiddelGoodsEdit } from '@/services/proto/delivery';
 import { ErmsMiddelGoodsEditReq } from '@/services/proto/delivery/interface';
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { validateAction } from '@/common/setup/form';
+import { FormState } from './interface';
 
 export default defineComponent({
     name: 'modify-custom',
@@ -92,31 +93,26 @@ export default defineComponent({
 
         const loading = ref<boolean>(false);
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const { middlegoodsid, goodsunitid, relatedgoodsid, evaluateratio, qtydecimalplace, relatedgoodstype, goodsgroupid, remark } = props.selctedMG.mg;
-                    const param: ErmsMiddelGoodsEditReq = {
-                        middlegoodsid, // uint64 套保品种ID
-                        goodsunitid, // int32 单位ID
-                        relatedgoodsid, // uint64 关联交易商品ID
-                        evaluateratio, // double 估价系数
-                        qtydecimalplace, // int32 数量小数位
-                        // modifierid,// uint64 修改人
-                        relatedgoodstype, // int32 关联商品类型 - 1:期货合约 2:现货品种
-                        needhedgeratio: formState.needhedgeratio as number, // double 套保比率
-                        // areauserid?,// uint64 机构用户ID
-                        goodsgroupid, // uint64 关联期货品种ID
-                        remark, // string 备注
-                    };
-                    requestResultLoadingAndInfo(ermsMiddelGoodsEdit, param, loading, ['修改成功', '修改失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                })
-                .catch((error: any) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then(() => {
+                const { middlegoodsid, goodsunitid, relatedgoodsid, evaluateratio, qtydecimalplace, relatedgoodstype, goodsgroupid, remark } = props.selctedMG.mg;
+                const param: ErmsMiddelGoodsEditReq = {
+                    middlegoodsid, // uint64 套保品种ID
+                    goodsunitid, // int32 单位ID
+                    relatedgoodsid, // uint64 关联交易商品ID
+                    evaluateratio, // double 估价系数
+                    qtydecimalplace, // int32 数量小数位
+                    // modifierid,// uint64 修改人
+                    relatedgoodstype, // int32 关联商品类型 - 1:期货合约 2:现货品种
+                    needhedgeratio: formState.needhedgeratio as number, // double 套保比率
+                    // areauserid?,// uint64 机构用户ID
+                    goodsgroupid, // uint64 关联期货品种ID
+                    remark, // string 备注
+                };
+                requestResultLoadingAndInfo(ermsMiddelGoodsEdit, param, loading, ['修改成功', '修改失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
         initData(() => {});
         return {

+ 3 - 0
src/views/information/goods/components/hedgingModify/interface.ts

@@ -0,0 +1,3 @@
+export interface FormState {
+    needhedgeratio: number | null
+}

+ 1 - 3
src/views/information/goods/components/hedgingModify/setup.ts

@@ -1,14 +1,12 @@
 import { ermsMiddelGoodsEdit } from "@/services/proto/delivery";
 import { ErmsMiddelGoodsEditReq } from "@/services/proto/delivery/interface";
 import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from './interface';
 /**
  * 表单
  * @returns 
  */
 export function handleForm() {
-    interface FormState {
-        needhedgeratio: number | null
-    }
     const formRef = ref();
     const formState: UnwrapRef<FormState> = reactive({
         needhedgeratio: null,

+ 307 - 312
src/views/information/goods/components/modify/index.vue

@@ -1,297 +1,298 @@
 <template>
-    <!-- 修改现货品种 -->
-    <a-modal class="commonModal addSpotVariety"
-             title="修改现货品种"
-             v-if="visible"
-             v-model:visible="visible"
-             centered
-             :maskClosable="maskClosableFlag"
-             @cancel="cancel"
-             width="890px">
-        <template #footer>
-            <a-button key="submit"
-                      type="primary"
-                      :loading="loading"
-                      @click="submit">完成
-            </a-button>
-        </template>
-        <a-form class="inlineForm"
-                ref="formRef"
-                :model="formState"
-                :rules="rules">
-            <fieldset class="formFieldSet">
-                <legend>基本信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="现货品种名称"
-                                     name="deliverygoodsname">
-                            <a-input class="dialogInput"
-                                     v-model:value="formState.deliverygoodsname"
-                                     style="width: 200px"
-                                     placeholder="请输入现货品种名称"/>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="现货品种代码"
-                                     name="deliverygoodscode">
-                            <a-input class="dialogInput"
-                                     style="width: 200px"
-                                     v-model:value="formState.deliverygoodscode"
-                                     placeholder="请输入现货品种代码"/>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="24">
-                        <a-form-item label="单位"
-                                     name="unitid">
-                            <a-select class="inlineFormSelect"
-                                      style="width: 200px"
-                                      v-model:value="formState.unitid"
-                                      placeholder="请选择单位">
-                                <a-select-option v-for="item in unitList"
-                                                 :value="item.enumitemname"
-                                                 :key="item.autoid">
-                                    {{ item.enumdicname }}
-                                </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="24">
-                        <a-form-item label="备注"
-                                     name="remark">
-                            <a-input class="dialogInput"
-                                     v-model:value="formState.remark"
-                                     style="width: 588px"
-                                     placeholder="请输入备注"/>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>品类信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle">
-                    <a-col :span="6">
+  <!-- 修改现货品种 -->
+  <a-modal class="commonModal addSpotVariety"
+           title="修改现货品种"
+           v-if="visible"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <fieldset class="formFieldSet">
+        <legend>基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="现货品种名称"
+                         name="deliverygoodsname">
+              <a-input class="dialogInput"
+                       v-model:value="formState.deliverygoodsname"
+                       style="width: 200px"
+                       placeholder="请输入现货品种名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种代码"
+                         name="deliverygoodscode">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.deliverygoodscode"
+                       placeholder="请输入现货品种代码" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="单位"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        v-model:value="formState.unitid"
+                        placeholder="请选择单位">
+                <a-select-option v-for="item in unitList"
+                                 :value="item.enumitemname"
+                                 :key="item.autoid">
+                  {{ item.enumdicname }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注"
+                         name="remark">
+              <a-input class="dialogInput"
+                       v-model:value="formState.remark"
+                       style="width: 588px"
+                       placeholder="请输入备注" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>品类信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle">
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               品类
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               单位
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               标仓系数
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               操作
             </span>
-                    </a-col>
-                    <template v-for="(domain, index) in formState.gldwrstandards"
-                              :key="domain.index + 'domain'">
-                        <a-col :span="6">
-                            <a-form-item :name="['gldwrstandards',index, 'wrstandardname', ]"
-                                         :rules="rules.gldwrstandards.wrstandardname">
-                                <a-input class="dialogInput"
-                                         v-model:value="domain.wrstandardname"
-                                         placeholder="请输入品类"></a-input>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6">
-                            <a-form-item :name="['gldwrstandards',index,'unitid' ]"
-                                         :rules="rules.gldwrstandards.unitid">
-                                <a-select class="inlineFormSelect"
-                                          v-model:value="domain.unitid"
-                                          placeholder="请选择单位">
-                                    <a-select-option v-for="item in unitList"
-                                                     :value="item.enumitemname"
-                                                     :key="item.autoid">
-                                        {{ item.enumdicname }}
-                                    </a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6">
-                            <a-form-item :name="['gldwrstandards',index,'convertfactor']"
-                                         :rules="rules.gldwrstandards.convertfactor">
-                                <a-input-number class="dialogInput"
-                                                style="width: 200px"
-                                                v-model:value="domain.convertfactor"
-                                                placeholder="请输入标仓系数"></a-input-number>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6"
-                               class="tc">
-                            <a-button class="plusBtn"
-                                      @click="deleteOne('gldwrstandards', index)"
-                                      v-if="index > 0">
-                                <template #icon>
-                                    <MinusOutlined/>
-                                </template>
-                            </a-button>
-                            <a-button class="minusBtn"
-                                      @click="addOne('gldwrstandards')">
-                                <template #icon>
-                                    <PlusOutlined/>
-                                </template>
-                            </a-button>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>品牌信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle dialogRowTitle2">
-                    <a-col :span="12">
+          </a-col>
+          <template v-for="(domain, index) in formState.gldwrstandards"
+                    :key="domain.index + 'domain'">
+            <a-col :span="6">
+              <a-form-item :name="['gldwrstandards',index, 'wrstandardname', ]"
+                           :rules="rules.gldwrstandards.wrstandardname">
+                <a-input class="dialogInput"
+                         v-model:value="domain.wrstandardname"
+                         placeholder="请输入品类"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item :name="['gldwrstandards',index,'unitid' ]"
+                           :rules="rules.gldwrstandards.unitid">
+                <a-select class="inlineFormSelect"
+                          v-model:value="domain.unitid"
+                          placeholder="请选择单位">
+                  <a-select-option v-for="item in unitList"
+                                   :value="item.enumitemname"
+                                   :key="item.autoid">
+                    {{ item.enumdicname }}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item :name="['gldwrstandards',index,'convertfactor']"
+                           :rules="rules.gldwrstandards.convertfactor">
+                <a-input-number class="dialogInput"
+                                style="width: 200px"
+                                v-model:value="domain.convertfactor"
+                                placeholder="请输入标仓系数"></a-input-number>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6"
+                   class="tc">
+              <a-button class="plusBtn"
+                        @click="deleteOne('gldwrstandards', index)"
+                        v-if="index > 0">
+                <template #icon>
+                  <MinusOutlined />
+                </template>
+              </a-button>
+              <a-button class="minusBtn"
+                        @click="addOne('gldwrstandards')">
+                <template #icon>
+                  <PlusOutlined />
+                </template>
+              </a-button>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>品牌信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle dialogRowTitle2">
+          <a-col :span="12">
             <span>
               <span class="red">*</span>
               品牌
             </span>
-                    </a-col>
-                    <a-col :span="12">
+          </a-col>
+          <a-col :span="12">
             <span>
               操作
             </span>
-                    </a-col>
-                    <template v-for="(domain, index) in formState.glddgfactoryItems"
-                              :key="domain.index + 'domain'">
-                        <a-col :span="12">
-                            <a-form-item :name="['glddgfactoryItems',index,'dgfactoryitemvalue']"
-                                         :rules="rules.glddgfactoryItems.dgfactoryitemvalue">
-                                <a-input class="dialogInput"
-                                         v-model:value="domain.dgfactoryitemvalue"
-                                         placeholder="请输入品牌"></a-input>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-button class="plusBtn"
-                                      @click="deleteOne('glddgfactoryItems', index)"
-                                      v-if="index > 0">
-                                <template #icon>
-                                    <MinusOutlined/>
-                                </template>
-                            </a-button>
-                            <a-button class="minusBtn"
-                                      @click="addOne('glddgfactoryItems')">
-                                <template #icon>
-                                    <PlusOutlined/>
-                                </template>
-                            </a-button>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>套保品种信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle">
-                    <a-col :span="6">
+          </a-col>
+          <template v-for="(domain, index) in formState.glddgfactoryItems"
+                    :key="domain.index + 'domain'">
+            <a-col :span="12">
+              <a-form-item :name="['glddgfactoryItems',index,'dgfactoryitemvalue']"
+                           :rules="rules.glddgfactoryItems.dgfactoryitemvalue">
+                <a-input class="dialogInput"
+                         v-model:value="domain.dgfactoryitemvalue"
+                         placeholder="请输入品牌"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-button class="plusBtn"
+                        @click="deleteOne('glddgfactoryItems', index)"
+                        v-if="index > 0">
+                <template #icon>
+                  <MinusOutlined />
+                </template>
+              </a-button>
+              <a-button class="minusBtn"
+                        @click="addOne('glddgfactoryItems')">
+                <template #icon>
+                  <PlusOutlined />
+                </template>
+              </a-button>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>套保品种信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle">
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               套保品种
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               单位
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               <span class="red">*</span>
               套保系数
             </span>
-                    </a-col>
-                    <a-col :span="6">
+          </a-col>
+          <a-col :span="6">
             <span>
               操作
             </span>
-                    </a-col>
-                    <template v-for="(domain, index) in formState.wrsconvertdetails"
-                              :key="domain.index + 'domain'">
-                        <a-col :span="6">
-                            <a-form-item :name="['wrsconvertdetails',index,'middlegoodsid']"
-                                         :rules="rules.wrsconvertdetails.middlegoodsid">
-                                <a-select class="inlineFormSelect"
-                                          @change="middleChange(domain.middlegoodsid, domain)"
-                                          v-model:value="domain.middlegoodsid"
-                                          placeholder="请选择套保品种">
-                                    <a-select-option v-for="item in goodsGroup"
-                                                     :value="item.goodsgroupid"
-                                                     :key="item.goodsgroupid">
-                                        {{ item.goodsgroupname }}
-                                    </a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6">
-                            <a-form-item :name="['wrsconvertdetails', index, 'unitidName']">
-                                <a-input class="dialogInput"
-                                         readonly
-                                         v-model:value="domain.unitidName"
-                                         placeholder="选择套保品种后自动填入"></a-input>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6">
-                            <a-form-item :name="['wrsconvertdetails', index, 'convertratio']"
-                                         :rules="rules.wrsconvertdetails.convertratio">
-                                <a-input-number class="dialogInput"
-                                                style="width: 200px"
-                                                v-model:value="domain.convertratio"
-                                                placeholder="请输入套保系数"></a-input-number>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="6"
-                               class="tc">
-                            <a-button class="plusBtn"
-                                      @click="deleteOne('wrsconvertdetails', index)"
-                                      v-if="index > 0">
-                                <template #icon>
-                                    <MinusOutlined/>
-                                </template>
-                            </a-button>
-                            <a-button class="minusBtn"
-                                      @click="addOne('wrsconvertdetails')">
-                                <template #icon>
-                                    <PlusOutlined/>
-                                </template>
-                            </a-button>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-        </a-form>
-    </a-modal>
+          </a-col>
+          <template v-for="(domain, index) in formState.wrsconvertdetails"
+                    :key="domain.index + 'domain'">
+            <a-col :span="6">
+              <a-form-item :name="['wrsconvertdetails',index,'middlegoodsid']"
+                           :rules="rules.wrsconvertdetails.middlegoodsid">
+                <a-select class="inlineFormSelect"
+                          @change="middleChange(domain.middlegoodsid, domain)"
+                          v-model:value="domain.middlegoodsid"
+                          placeholder="请选择套保品种">
+                  <a-select-option v-for="item in goodsGroup"
+                                   :value="item.goodsgroupid"
+                                   :key="item.goodsgroupid">
+                    {{ item.goodsgroupname }}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item :name="['wrsconvertdetails', index, 'unitidName']">
+                <a-input class="dialogInput"
+                         readonly
+                         v-model:value="domain.unitidName"
+                         placeholder="选择套保品种后自动填入"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item :name="['wrsconvertdetails', index, 'convertratio']"
+                           :rules="rules.wrsconvertdetails.convertratio">
+                <a-input-number class="dialogInput"
+                                style="width: 200px"
+                                v-model:value="domain.convertratio"
+                                placeholder="请输入套保系数"></a-input-number>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6"
+                   class="tc">
+              <a-button class="plusBtn"
+                        @click="deleteOne('wrsconvertdetails', index)"
+                        v-if="index > 0">
+                <template #icon>
+                  <MinusOutlined />
+                </template>
+              </a-button>
+              <a-button class="minusBtn"
+                        @click="addOne('wrsconvertdetails')">
+                <template #icon>
+                  <PlusOutlined />
+                </template>
+              </a-button>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref, toRaw, watchEffect} from 'vue';
-import {closeModal} from '@/common/setup/modal/index';
-import {initData} from '@/common/methods/index';
-import {PlusOutlined, MinusOutlined} from '@ant-design/icons-vue';
-import {handleFromState, handleGoodsGroup} from './setup';
-import {RuleObject, ValidateErrorEntity} from 'ant-design-vue/es/form/interface';
-import {FormState, WRSConvertDetailEx} from './interface';
-import {validateCommon} from '@/common/setup/validate';
-import {initDG} from '../../list/spot-variety/setup';
-import {ErmcpDeliveryGoodsDetailEx, ErmcpDeliveryGoods} from '@/services/go/ermcp/goodsInfo/interface';
-import {mergeTwoObj} from '@/utils/objHandle';
-import {getGoodsUnitEnumList} from '@/common/constants/enumsList';
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
-import {addDeliveryGoodsApply, ermsMiddelGoodsEdit} from "@/services/proto/delivery";
-import {DeliveryGoodsApplyReq} from "@/services/proto/delivery/interface";
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { initData } from '@/common/methods/index';
+import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
+import { handleFromState, handleGoodsGroup } from './setup';
+import { RuleObject } from 'ant-design-vue/es/form/interface';
+import { FormState, WRSConvertDetailEx } from './interface';
+import { validateCommon } from '@/common/setup/validate';
+import { initDG } from '../../list/spot-variety/setup';
+import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { getGoodsUnitEnumList } from '@/common/constants/enumsList';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { addDeliveryGoodsApply } from '@/services/proto/delivery';
+import { DeliveryGoodsApplyReq } from '@/services/proto/delivery/interface';
+import { validateAction } from '@/common/setup/form';
 
 interface Obj {
     [props: string]: any;
@@ -325,7 +326,7 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const {visible, cancel} = closeModal('goods_info_spot_normal_modify');
+        const { visible, cancel } = closeModal('goods_info_spot_normal_modify');
         // 下单方法
         const loading = ref<boolean>(false);
 
@@ -334,71 +335,65 @@ export default defineComponent({
 
         // 表单
         const formRef = ref();
-        const {formState, addOne, deleteOne} = handleFromState();
+        const { formState, addOne, deleteOne } = handleFromState();
         const rules = {
-            deliverygoodsname: [{required: true, message: '请输入现货品种名称', trigger: 'blur'}],
+            deliverygoodsname: [{ required: true, message: '请输入现货品种名称', trigger: 'blur' }],
             // unitid: [{ required: true, message: '请选择单位', trigger: 'change' }],
-            unitid: [{required: true, validator: validateUnit, trigger: 'change'}],
+            unitid: [{ required: true, validator: validateUnit, trigger: 'change' }],
             gldwrstandards: {
-                unitid: {required: true, validator: validateUnit, trigger: 'change'},
-                wrstandardname: {required: true, message: '请输入品类', trigger: 'blur'},
-                convertfactor: {required: true, message: '请输入标仓系数', trigger: 'blur'},
+                unitid: { required: true, validator: validateUnit, trigger: 'change' },
+                wrstandardname: { required: true, message: '请输入品类', trigger: 'blur' },
+                convertfactor: { required: true, message: '请输入标仓系数', trigger: 'blur' },
             },
             glddgfactoryItems: {
-                dgfactoryitemvalue: {required: true, message: '请输入品牌', trigger: 'blur'},
+                dgfactoryitemvalue: { required: true, message: '请输入品牌', trigger: 'blur' },
             },
             wrsconvertdetails: {
-                middlegoodsid: {required: true, validator: valideteWR, trigger: 'change'},
-                convertratio: {required: true, message: '请输入套保系数', trigger: 'blur'},
+                middlegoodsid: { required: true, validator: valideteWR, trigger: 'change' },
+                convertratio: { required: true, message: '请输入套保系数', trigger: 'blur' },
             },
         };
 
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const unitid = param.unitid === undefined ? 0 : param.unitid
-                    const reqParam: DeliveryGoodsApplyReq = {
-                        deliverygoodsid: param.deliverygoodsid,
-                        unitid: unitid,
-                        deliverygoodsname: param.deliverygoodsname,
-                        deliverygoodscode: param.deliverygoodscode,
-                        type: 2,
-                        remark: param.remark,
-                        gldwrstandards: param.gldwrstandards.map(value => {
-                            const gldunitid = value.unitid === undefined ? 0 : value.unitid
-                            const convertfactors: any = value.convertfactor === null ? 0 : value.convertfactor
-                            return {
-                                wrstandardid: value.wrstandardid,
-                                wrstandardname: value.wrstandardname,
-                                unitid: gldunitid,
-                                convertfactor: (convertfactors as string) ? Number(convertfactors) : convertfactors
-                            }
-                        }),
-                        glddgfactoryItems: param.glddgfactoryItems,
-                        wrsconvertdetails: param.wrsconvertdetails.map(value => {
-                            const middlegoodsid = value.middlegoodsid === undefined ? 0 : value.middlegoodsid
-                            const convertratio: any = value.convertratio === null ? 0 : value.convertratio
-                            const wrsunitid = value.unitid === null ? 0 : value.unitid
-                            return {
-                                middlegoodsid: middlegoodsid,
-                                convertratio: convertratio ? Number(convertratio) : convertratio,
-                                unitid: wrsunitid
-                            }
-                        })
-                    }
-                    requestResultLoadingAndInfo(addDeliveryGoodsApply, reqParam, loading, ['修改现货品种成功', '修改现货品种失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const unitid = param.unitid === undefined ? 0 : param.unitid;
+                const reqParam: DeliveryGoodsApplyReq = {
+                    deliverygoodsid: param.deliverygoodsid,
+                    unitid: unitid,
+                    deliverygoodsname: param.deliverygoodsname,
+                    deliverygoodscode: param.deliverygoodscode,
+                    type: 2,
+                    remark: param.remark,
+                    gldwrstandards: param.gldwrstandards.map((value) => {
+                        const gldunitid = value.unitid === undefined ? 0 : value.unitid;
+                        const convertfactors: any = value.convertfactor === null ? 0 : value.convertfactor;
+                        return {
+                            wrstandardid: value.wrstandardid,
+                            wrstandardname: value.wrstandardname,
+                            unitid: gldunitid,
+                            convertfactor: (convertfactors as string) ? Number(convertfactors) : convertfactors,
+                        };
+                    }),
+                    glddgfactoryItems: param.glddgfactoryItems,
+                    wrsconvertdetails: param.wrsconvertdetails.map((value) => {
+                        const middlegoodsid = value.middlegoodsid === undefined ? 0 : value.middlegoodsid;
+                        const convertratio: any = value.convertratio === null ? 0 : value.convertratio;
+                        const wrsunitid = value.unitid === null ? 0 : value.unitid;
+                        return {
+                            middlegoodsid: middlegoodsid,
+                            convertratio: convertratio ? Number(convertratio) : convertratio,
+                            unitid: wrsunitid,
+                        };
+                    }),
+                };
+                requestResultLoadingAndInfo(addDeliveryGoodsApply, reqParam, loading, ['修改现货品种成功', '修改现货品种失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
 
-        const {goodsGroup, getGoodsGroup} = handleGoodsGroup();
+        const { goodsGroup, getGoodsGroup } = handleGoodsGroup();
 
         /**
          * 切换套保品种时候,获取对应的单位
@@ -413,29 +408,29 @@ export default defineComponent({
 
         watchEffect(() => {
             if (props.selctedDeliveryGoods.data.deliverygoodsname) {
-                const {data, gblist, gmlist, mgList} = props.selctedDeliveryGoods;
+                const { data, gblist, gmlist, mgList } = props.selctedDeliveryGoods;
                 mergeTwoObj(formState, props.selctedDeliveryGoods);
                 mergeTwoObj(formState, data);
                 // 单位
                 formState.unitid = data.agreeunit;
                 // 品类
                 formState.gldwrstandards = gmlist.map((e) => {
-                    const {wrstandardid, wrstandardname, convertfactor, unitid} = e;
-                    return {wrstandardid, wrstandardname, convertfactor: convertfactor.toString(), unitid};
+                    const { wrstandardid, wrstandardname, convertfactor, unitid } = e;
+                    return { wrstandardid, wrstandardname, convertfactor: convertfactor.toString(), unitid };
                 });
                 // 品牌
                 formState.glddgfactoryItems = gblist.map((e) => {
-                    const {brandid, brandname} = e;
-                    return {dgfactoryitemid: brandid, dgfactoryitemvalue: brandname};
+                    const { brandid, brandname } = e;
+                    return { dgfactoryitemid: brandid, dgfactoryitemvalue: brandname };
                 });
                 // 套保信息
                 formState.wrsconvertdetails = mgList.map((e) => {
-                    const {goodsgroupid, goodsunitid, enumdicname} = e.mg;
+                    const { goodsgroupid, goodsunitid, enumdicname } = e.mg;
                     return {
                         middlegoodsid: goodsgroupid,
                         unitid: goodsunitid,
                         unitidName: enumdicname,
-                        convertratio: e.convertratio.toString()
+                        convertratio: e.convertratio.toString(),
                     };
                 });
             }

+ 32 - 38
src/views/information/spot-contract/components/add/index.vue

@@ -423,6 +423,7 @@ import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
 import { handleAccountManager } from '../setup';
 import { Moment } from 'moment';
 import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handlePrice, handleDate, handleFromState } from '../setup';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'add-spot-contract',
@@ -459,42 +460,35 @@ export default defineComponent({
         const goodsList = ref<Goods[]>([]);
 
         function submit(OperateType: 1 | 2) {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const id = getUsrId();
-                    isSell.value ? (param.SellUserID = id) : (param.BuyUserID = id);
-                    const fn = (value: Moment) => {
-                        return formatTime(value, 'd') + ' ' + '00:00:00';
-                    };
-                    // 交收期
-                    const dDate = deliveryDate.value;
-                    if (dDate.length) {
-                        const DeliveryStartDate = fn(dDate[0]);
-                        const DeliveryEndDate = fn(dDate[1]);
-                        Object.assign(param, { DeliveryStartDate, DeliveryEndDate });
-                    }
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const id = getUsrId();
+                isSell.value ? (param.SellUserID = id) : (param.BuyUserID = id);
+                const fn = (value: Moment) => {
+                    return formatTime(value, 'd') + ' ' + '00:00:00';
+                };
+                // 交收期
+                const dDate = deliveryDate.value;
+                if (dDate.length) {
+                    const DeliveryStartDate = fn(dDate[0]);
+                    const DeliveryEndDate = fn(dDate[1]);
+                    Object.assign(param, { DeliveryStartDate, DeliveryEndDate });
+                }
 
-                    // 点价期
-                    const pDate = priceDate.value;
-                    if (pDate.length && param.PriceType !== 1) {
-                        // 点价日期[2:点价3:暂定价]
-                        const StartDate = fn(pDate[0]);
-                        const EndDate = fn(pDate[1]);
-                        Object.assign(param, { StartDate, EndDate });
-                    }
-
-                    sendReq(param, loading, OperateType)
-                        .then((res) => {
-                            context.emit('refresh');
-                            cancel();
-                        })
-                        .catch((err) => {});
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
-                });
+                // 点价期
+                const pDate = priceDate.value;
+                if (pDate.length && param.PriceType !== 1) {
+                    // 点价日期[2:点价3:暂定价]
+                    const StartDate = fn(pDate[0]);
+                    const EndDate = fn(pDate[1]);
+                    Object.assign(param, { StartDate, EndDate });
+                }
+                sendReq(param, loading, OperateType)
+                    .then((res) => {
+                        context.emit('refresh');
+                        cancel();
+                    })
+                    .catch((err) => {});
+            });
         }
 
         initData(() => {
@@ -544,8 +538,8 @@ export default defineComponent({
 
 <style lang="less">
 .add-spot-contract {
-  .ant-upload-list-item-name{
-    padding: 0 20PX;
-  }
+    .ant-upload-list-item-name {
+        padding: 0 20px;
+    }
 }
 </style>;

+ 3 - 4
src/views/information/spot-contract/components/check/index.vue

@@ -234,7 +234,8 @@ import { Modal } from 'ant-design-vue';
 import { handleForm } from './setup';
 import { handleAccountManager } from '../setup';
 import { GldErmcpSpotContractOperateReq, SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
-import Long from 'long';
+import { validateAction } from '@/common/setup/form';
+import { FormState } from './interface';
 
 export default defineComponent({
     name: 'spot-contract-detail',
@@ -254,14 +255,12 @@ export default defineComponent({
         // 表单
         const { rules, formState, formRef } = handleForm();
         function submit() {
-            formRef.value.validate().then(() => {
+            validateAction<FormState>(formRef, formState).then((param) => {
                 Modal.confirm({
                     title: '是否确认审核通过',
                     okText: '审核通过',
                     cancelText: '取消',
                     onOk() {
-                        const param = toRaw(formState);
-
                         const reqs: GldErmcpSpotContractOperateReq = {
                             SpotContractID: props.selectedRow.spotcontractid,
                             OperateType: 4,

+ 29 - 34
src/views/information/spot-contract/components/modify/index.vue

@@ -421,6 +421,7 @@ import { Moment } from 'moment';
 import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handlePrice, handleDate, handleFromState } from '../setup';
 import { addContractReq } from '@/views/information/spot-contract/components/add/setup';
 import { mergeTwoObj } from '@/utils/objHandle';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'modify-spot-contract',
@@ -470,42 +471,36 @@ export default defineComponent({
             }
         });
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const id = getUsrId();
-                    isSell.value ? (param.SellUserID = id) : (param.BuyUserID = id);
-                    const fn = (value: Moment) => {
-                        return formatTime(value, 'd') + ' ' + '00:00:00';
-                    };
-                    // 交收期
-                    const dDate = deliveryDate.value;
-                    if (dDate.length) {
-                        const DeliveryStartDate = fn(dDate[0]);
-                        const DeliveryEndDate = fn(dDate[1]);
-                        Object.assign(param, { DeliveryStartDate, DeliveryEndDate });
-                    }
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const id = getUsrId();
+                isSell.value ? (param.SellUserID = id) : (param.BuyUserID = id);
+                const fn = (value: Moment) => {
+                    return formatTime(value, 'd') + ' ' + '00:00:00';
+                };
+                // 交收期
+                const dDate = deliveryDate.value;
+                if (dDate.length) {
+                    const DeliveryStartDate = fn(dDate[0]);
+                    const DeliveryEndDate = fn(dDate[1]);
+                    Object.assign(param, { DeliveryStartDate, DeliveryEndDate });
+                }
 
-                    // 点价期
-                    const pDate = priceDate.value;
-                    if (pDate.length && param.PriceType !== 1) {
-                        // 点价日期[2:点价3:暂定价]
-                        const StartDate = fn(pDate[0]);
-                        const EndDate = fn(pDate[1]);
-                        Object.assign(param, { StartDate, EndDate });
-                    }
+                // 点价期
+                const pDate = priceDate.value;
+                if (pDate.length && param.PriceType !== 1) {
+                    // 点价日期[2:点价3:暂定价]
+                    const StartDate = fn(pDate[0]);
+                    const EndDate = fn(pDate[1]);
+                    Object.assign(param, { StartDate, EndDate });
+                }
 
-                    sendReq(param, loading, 2)
-                        .then((res) => {
-                            context.emit('refresh');
-                            cancel();
-                        })
-                        .catch((err) => {});
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
-                });
+                sendReq(param, loading, 2)
+                    .then((res) => {
+                        context.emit('refresh');
+                        cancel();
+                    })
+                    .catch((err) => {});
+            });
         }
         initData(() => {
             queryCustomList();

+ 143 - 115
src/views/information/spot-contract/list/checkpending/index.vue

@@ -1,132 +1,160 @@
 <template>
-  <!-- 现货合同: 待审核-->
-  <div class="spot-contract-peddding"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               rowKey="key"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- <template #userinfotype="{ text }">
-                  <a>{{ text === '2' ? '企业' : '个人'}}</a>
-                </template> -->
+    <!-- 现货合同: 待审核-->
+    <div class="spot-contract-peddding"
+         :loading="loading">
+        <filterCustomTable @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     rowKey="key"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- <template #userinfotype="{ text }">
+                          <a>{{ text === '2' ? '企业' : '个人'}}</a>
+                        </template> -->
 
-        <template #biztype="{ text }">
-          <a>{{ getBizTypeName(text) }}</a>
-        </template>
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
 
-        <template #pricetype="{ text }">
-          <a>{{ getPriceTypeName(text) }}</a>
-        </template>
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
 
-        <template #contracctstatus="{ text }">
-          <a>{{ getContractStatusName(text) }}</a>
-        </template>
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
 
-        <template #contracttype="{ text }">
-          <a>{{ getContractTypeName(text) }}</a>
-        </template>
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #negative="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
+                <template #startdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+                </template>
+                <!-- 交收期 -->
+                <template #deliverystartdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+                        formatTime(record.deliveryenddate, "d")) }}</a>
+                </template>
 
-      </a-table>
-    </contextMenu>
-    <!-- 现货合同: 详情 -->
-    <SpotContractDeatil :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-    <!-- 现货合同: 审核 -->
-    <Check :selectedRow="selectedRow"
-           @refresh="queryTable" />
-    <!-- 现货合同: 撤销 -->
-    <Cancel :selectedRow="selectedRow"
-            @refresh="queryTable" />
-  </div>
+            </a-table>
+        </contextMenu>
+        <!-- 现货合同: 详情 -->
+        <SpotContractDeatil :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+        <!-- 现货合同: 审核 -->
+        <Check :selectedRow="selectedRow"
+               @refresh="queryTable"/>
+        <!-- 现货合同: 撤销 -->
+        <Cancel :selectedRow="selectedRow"
+                @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable } from '../../components';
-import { queryTableList, Ermcp3ContractRsp } from '../index';
-import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
-import { Column, ColumnType } from '@/common/setup/table';
-
-export default defineComponent({
-    name: 'spot-contract-peddding',
-    components: {
-        filterCustomTable,
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
         contextMenu,
-        AddSpotContract,
-        SpotContractDeatil,
-        Check,
-        Cancel,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_checkpending', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(2);
+        BtnList
+    } from '@/common/export/table';
+    import {AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable} from '../../components';
+    import {queryTableList, Ermcp3ContractRsp} from '../index';
+    import {
+        getBizTypeName,
+        getContractStatusName,
+        getContractTypeName,
+        getPriceTypeName
+    } from '@/views/information/spot-contract/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
+    import {formatTime, formatValue} from "@/common/methods";
+
+    export default defineComponent({
+        name: 'spot-contract-peddding',
+        components: {
+            filterCustomTable,
+            contextMenu,
+            AddSpotContract,
+            SpotContractDeatil,
+            Check,
+            Cancel,
+            BtnList,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('spot_contract_checkpending', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList(2);
 
-        // 查询
-        function search(value: any) {
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
 
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columntitle === '对手方') {
-                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                        if (record.contracttype === 1) {
-                            //采购方
-                            return record.sellusername.includes(value);
-                        } else {
-                            // 销售
-                            return record.buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.negative || null;
-                }
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columntitle === '对手方') {
+                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                            if (record.contracttype === 1) {
+                                //采购方
+                                return record.sellusername.includes(value);
+                            } else {
+                                // 销售
+                                return record.buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.negative || null;
+                    }
+                });
             });
-        });
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            queryTable,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                queryTable,
+                getBizTypeName,
+                getPriceTypeName,
+                getContractStatusName,
+                getContractTypeName,
+                formatTime,
+                formatValue,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.spot-contract-peddding {
-}
+    .spot-contract-peddding {
+    }
 </style>;

+ 139 - 108
src/views/information/spot-contract/list/finished/index.vue

@@ -1,122 +1,153 @@
 <template>
-  <!-- 现货合同: 已完成-->
-  <div class="spot-contract-done">
-    <filterCustomTable @search="search"
-                       :loading="loading">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人'}}</a>
-        </template> -->
-        <template #biztype="{ text }">
-          <a>{{ getBizTypeName(text) }}</a>
-        </template>
+    <!-- 现货合同: 已完成-->
+    <div class="spot-contract-done">
+        <filterCustomTable @search="search"
+                           :loading="loading">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- <template #userinfotype="{ text }">
+                  <a>{{ text === '2' ? '企业' : '个人'}}</a>
+                </template> -->
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
 
-        <template #pricetype="{ text }">
-          <a>{{ getPriceTypeName(text) }}</a>
-        </template>
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
 
-        <template #contracctstatus="{ text }">
-          <a>{{ getContractStatusName(text) }}</a>
-        </template>
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
 
-        <template #contracttype="{ text }">
-          <a>{{ getContractTypeName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 新增现货合同 -->
-    <AddSpotContract @refresh="queryTable" />
-    <!-- 现货合同: 详情 -->
-    <SpotContractDeatil :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-  </div>
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #negative="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
+                <template #startdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+                </template>
+                <!-- 交收期 -->
+                <template #deliverystartdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+                        formatTime(record.deliveryenddate, "d")) }}</a>
+                </template>
+
+            </a-table>
+        </contextMenu>
+        <!-- 新增现货合同 -->
+        <AddSpotContract @refresh="queryTable"/>
+        <!-- 现货合同: 详情 -->
+        <SpotContractDeatil :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { AddSpotContract, SpotContractDeatil, filterCustomTable } from '../../components';
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
+        contextMenu,
+        BtnList
+    } from '@/common/export/table';
+    import {AddSpotContract, SpotContractDeatil, filterCustomTable} from '../../components';
 
-import { queryTableList, Ermcp3ContractRsp } from '../index';
-import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
-import { Column, ColumnType } from '@/common/setup/table';
+    import {queryTableList, Ermcp3ContractRsp} from '../index';
+    import {
+        getBizTypeName,
+        getContractStatusName,
+        getContractTypeName,
+        getPriceTypeName
+    } from '@/views/information/spot-contract/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
+    import {formatTime, formatValue} from "@/common/methods";
 
-export default defineComponent({
-    name: 'spot-contract-done',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        AddSpotContract,
-        SpotContractDeatil,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_finished', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(4);
-        // 查询
-        function search(value: any) {
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columntitle === '对手方') {
-                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                        if (record.contracttype === 1) {
-                            //采购方
-                            return record.sellusername.includes(value);
-                        } else {
-                            // 销售
-                            return record.buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.negative || null;
-                }
+    export default defineComponent({
+        name: 'spot-contract-done',
+        components: {
+            filterCustomTable,
+            contextMenu,
+            AddSpotContract,
+            SpotContractDeatil,
+            BtnList,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('spot_contract_finished', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList(4);
+
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
+
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columntitle === '对手方') {
+                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                            if (record.contracttype === 1) {
+                                //采购方
+                                return record.sellusername.includes(value);
+                            } else {
+                                // 销售
+                                return record.buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.negative || null;
+                    }
+                });
             });
-        });
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                getBizTypeName,
+                getPriceTypeName,
+                getContractStatusName,
+                getContractTypeName,
+                formatTime,
+                formatValue,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.spot-contract-done {
-}
+    .spot-contract-done {
+    }
 </style>;

+ 142 - 111
src/views/information/spot-contract/list/performance/index.vue

@@ -1,125 +1,156 @@
 <template>
-  <!-- 现货合同: 履约中-->
-  <div class="spot-contract-performance">
-    <filterCustomTable @search="search"
-                       :loading="loading">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人'}}</a>
-        </template> -->
-        <template #biztype="{ text }">
-          <a>{{ getBizTypeName(text) }}</a>
-        </template>
+    <!-- 现货合同: 履约中-->
+    <div class="spot-contract-performance">
+        <filterCustomTable @search="search"
+                           :loading="loading">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- <template #userinfotype="{ text }">
+                  <a>{{ text === '2' ? '企业' : '个人'}}</a>
+                </template> -->
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
 
-        <template #pricetype="{ text }">
-          <a>{{ getPriceTypeName(text) }}</a>
-        </template>
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
 
-        <template #contracctstatus="{ text }">
-          <a>{{ getContractStatusName(text) }}</a>
-        </template>
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
 
-        <template #contracttype="{ text }">
-          <a>{{ getContractTypeName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 现货合同: 详情 -->
-    <SpotContractDeatil :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-    <!-- 现货合同: 正常完结 -->
-    <Finish :selectedRow="selectedRow"
-            @refresh="queryTable" />
-  </div>
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #negative="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
+                <!-- 点假期 -->
+                <template #startdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+                </template>
+                <!-- 交收期 -->
+                <template #deliverystartdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+                        formatTime(record.deliveryenddate, "d")) }}</a>
+                </template>
+            </a-table>
+        </contextMenu>
+        <!-- 现货合同: 详情 -->
+        <SpotContractDeatil :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+        <!-- 现货合同: 正常完结 -->
+        <Finish :selectedRow="selectedRow"
+                @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { AddSpotContract, SpotContractDeatil, filterCustomTable, Finish } from '../../components';
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
+        contextMenu,
+        BtnList
+    } from '@/common/export/table';
+    import {AddSpotContract, SpotContractDeatil, filterCustomTable, Finish} from '../../components';
 
-import { queryTableList, Ermcp3ContractRsp } from '../index';
-import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
-import { Column, ColumnType } from '@/common/setup/table';
+    import {queryTableList, Ermcp3ContractRsp} from '../index';
+    import {
+        getBizTypeName,
+        getContractStatusName,
+        getContractTypeName,
+        getPriceTypeName
+    } from '@/views/information/spot-contract/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
+    import {formatTime, formatValue} from "@/common/methods";
 
-export default defineComponent({
-    name: 'spot-contract-performance',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        AddSpotContract,
-        SpotContractDeatil,
-        Finish,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_performance', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(3);
-        // 查询
-        function search(value: any) {
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columntitle === '对手方') {
-                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                        if (record.contracttype === 1) {
-                            //采购方
-                            return record.sellusername.includes(value);
-                        } else {
-                            // 销售
-                            return record.buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.negative || null;
-                }
+    export default defineComponent({
+        name: 'spot-contract-performance',
+        components: {
+            filterCustomTable,
+            contextMenu,
+            AddSpotContract,
+            SpotContractDeatil,
+            Finish,
+            BtnList,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('spot_contract_performance', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList(3);
+
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
+
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columntitle === '对手方') {
+                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                            if (record.contracttype === 1) {
+                                //采购方
+                                return record.sellusername.includes(value);
+                            } else {
+                                // 销售
+                                return record.buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.negative || null;
+                    }
+                });
             });
-        });
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-            queryTable,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                getBizTypeName,
+                getPriceTypeName,
+                getContractStatusName,
+                getContractTypeName,
+                queryTable,
+                formatTime,
+                formatValue,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.spot-contract-performance {
-}
+    .spot-contract-performance {
+    }
 </style>;

+ 154 - 118
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -1,138 +1,174 @@
 <template>
-  <!-- 现货合同: 未提交-->
-  <div class="spot-contract-not-commit"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- <template #userinfotype="{ text }">
-                  <a>{{ text === '2' ? '企业' : '个人'}}</a>
-                </template> -->
-        <template #biztype="{ text }">
-          <a>{{ getBizTypeName(text) }}</a>
-        </template>
+    <!-- 现货合同: 未提交-->
+    <div class="spot-contract-not-commit"
+         :loading="loading">
+        <filterCustomTable @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- <template #userinfotype="{ text }">
+                          <a>{{ text === '2' ? '企业' : '个人'}}</a>
+                        </template> -->
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
 
-        <template #pricetype="{ text }">
-          <a>{{ getPriceTypeName(text) }}</a>
-        </template>
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
 
-        <template #contracctstatus="{ text }">
-          <a>{{ getContractStatusName(text) }}</a>
-        </template>
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
 
-        <template #contracttype="{ text }">
-          <a>{{ getContractTypeName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 新增现货合同 -->
-    <AddSpotContract @refresh="queryTable" />
-    <!-- 现货合同: 详情 -->
-    <SpotContractDeatil :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-    <!-- 现货合同: 修改 -->
-    <ModifySpotContract :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-    <!-- 现货合同: 删除 -->
-    <DeleteSpotContract :selectedRow="selectedRow"
-                        @refresh="queryTable" />
-    <!-- 现货合同: 重新提交 -->
-    <ResubmitSpotContract :selectedRow="selectedRow"
-                          @refresh="queryTable" />
-  </div>
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #negative="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
+                <!-- 点假期 -->
+                <template #startdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+                </template>
+                <!-- 交收期 -->
+                <template #deliverystartdate="{ record }">
+                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+                        formatTime(record.deliveryenddate, "d")) }}</a>
+                </template>
+            </a-table>
+        </contextMenu>
+        <!-- 新增现货合同 -->
+        <AddSpotContract @refresh="queryTable"/>
+        <!-- 现货合同: 详情 -->
+        <SpotContractDeatil :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+        <!-- 现货合同: 修改 -->
+        <ModifySpotContract :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+        <!-- 现货合同: 删除 -->
+        <DeleteSpotContract :selectedRow="selectedRow"
+                            @refresh="queryTable"/>
+        <!-- 现货合同: 重新提交 -->
+        <ResubmitSpotContract :selectedRow="selectedRow"
+                              @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { AddSpotContract, SpotContractDeatil, filterCustomTable, ModifySpotContract, DeleteSpotContract, ResubmitSpotContract } from '../../components';
-
-import { queryTableList, Ermcp3ContractRsp } from '../index';
-import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
-import { Column, ColumnType } from '@/common/setup/table';
-
-export default defineComponent({
-    name: 'spot-contract-not-commit',
-    components: {
-        filterCustomTable,
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
         contextMenu,
+        BtnList
+    } from '@/common/export/table';
+    import {
         AddSpotContract,
         SpotContractDeatil,
+        filterCustomTable,
         ModifySpotContract,
         DeleteSpotContract,
-        ResubmitSpotContract,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(1);
+        ResubmitSpotContract
+    } from '../../components';
+
+    import {queryTableList, Ermcp3ContractRsp} from '../index';
+    import {
+        getBizTypeName,
+        getContractStatusName,
+        getContractTypeName,
+        getPriceTypeName
+    } from '@/views/information/spot-contract/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
+    import {formatTime, formatValue} from "@/common/methods";
+
+    export default defineComponent({
+        name: 'spot-contract-not-commit',
+        components: {
+            filterCustomTable,
+            contextMenu,
+            AddSpotContract,
+            SpotContractDeatil,
+            ModifySpotContract,
+            DeleteSpotContract,
+            ResubmitSpotContract,
+            BtnList,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('spot_contract_unsubmitted', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList(1);
 
-        // 查询
-        function search(value: any) {
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
 
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columntitle === '对手方') {
-                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                        if (record.contracttype === 1) {
-                            //采购方
-                            return record.sellusername.includes(value);
-                        } else {
-                            // 销售
-                            return record.buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.negative || null;
-                }
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columntitle === '对手方') {
+                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                            if (record.contracttype === 1) {
+                                //采购方
+                                return record.sellusername.includes(value);
+                            } else {
+                                // 销售
+                                return record.buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.negative || null;
+                    }
+                });
             });
-        });
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            queryTable,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                queryTable,
+                getBizTypeName,
+                getPriceTypeName,
+                getContractStatusName,
+                getContractTypeName,
+                formatTime,
+                formatValue,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.spot-contract-not-commit {
-}
+    .spot-contract-not-commit {
+    }
 </style
 >;

+ 19 - 31
src/views/information/warehouse-info/compoments/add/index.vue

@@ -143,6 +143,7 @@ import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface
 import { getWarehouseTypeEnumList } from '@/common/constants/enumsList';
 import { addWarehouseApply } from '@/services/proto/warehouse';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'warehouse_info_btn_add',
@@ -160,38 +161,25 @@ export default defineComponent({
         const warehouseType = ref<AllEnums[]>(getWarehouseTypeEnumList());
         const { formRef, formState, rules } = handleForm();
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const reqParam: WarehouseApplyReq = {
-                        type: 1, // int32 类型 1 新增 2 修改
-                        warehouseid: param.warehouseid, // uint64 仓库ID
-                        warehousecode: param.warehousecode, // string 仓库代码
-                        warehousename: param.warehousename, // string 仓库名称
-                        warehousetype: undefined === param.warehousetype ? 0 : (param.warehousetype as number), // int32 仓库类型 - 1 厂库  2 自有库  3 合作库
-                        provinceid: undefined === param.provinceid ? 0 : (param.provinceid as number), // uint64 省
-                        cityid: undefined === param.cityid ? 0 : (param.cityid as number), // uint64 市
-                        districtid: undefined === param.districtid ? 0 : (param.districtid as number), // int32 区
-                        address: param.address, // string 详细地址
-                        contactname: param.contactname, // string 联系人
-                        contactnum: param.contactnum, // string 联系电话
-                    };
-                    requestResultLoadingAndInfo(addWarehouseApply, reqParam, loading, ['新建仓库成功', '新建仓库失败']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
-                    // warehouseApply(reqParam, loading)
-                    //     .then((res) => {
-                    //         cancel();
-                    //         context.emit('refresh');
-                    //     })
-                    //     .catch((err) => {});
-                    console.log('param', param);
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const reqParam: WarehouseApplyReq = {
+                    type: 1, // int32 类型 1 新增 2 修改
+                    warehouseid: param.warehouseid, // uint64 仓库ID
+                    warehousecode: param.warehousecode, // string 仓库代码
+                    warehousename: param.warehousename, // string 仓库名称
+                    warehousetype: undefined === param.warehousetype ? 0 : (param.warehousetype as number), // int32 仓库类型 - 1 厂库  2 自有库  3 合作库
+                    provinceid: undefined === param.provinceid ? 0 : (param.provinceid as number), // uint64 省
+                    cityid: undefined === param.cityid ? 0 : (param.cityid as number), // uint64 市
+                    districtid: undefined === param.districtid ? 0 : (param.districtid as number), // int32 区
+                    address: param.address, // string 详细地址
+                    contactname: param.contactname, // string 联系人
+                    contactnum: param.contactnum, // string 联系电话
+                };
+                requestResultLoadingAndInfo(addWarehouseApply, reqParam, loading, ['新建仓库成功', '新建仓库失败']).then(() => {
+                    cancel();
+                    context.emit('refresh');
                 });
+            });
         }
         return {
             visible,

+ 22 - 28
src/views/information/warehouse-info/compoments/modify/index.vue

@@ -136,12 +136,12 @@ import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { getAddress } from '@/services/go/adress';
 import { handleForm, FormState, warehouseApply } from '../setup';
-import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { WarehouseApplyReq } from '@/services/proto/warehouse/interface';
 import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { getWarehouseTypeEnumList } from '@/common/constants/enumsList';
+import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
     name: 'warehouse_info_btn_modify',
@@ -167,33 +167,27 @@ export default defineComponent({
             }
         });
         function submit() {
-            formRef.value
-                .validate()
-                .then(() => {
-                    const param = toRaw(formState);
-                    const reqParam: WarehouseApplyReq = {
-                        type: 2, // int32 类型 1 新增 2 修改
-                        warehouseid: props.selectedRow.autoid, // uint64 仓库ID
-                        warehousecode: props.selectedRow.warehousecode, // string 仓库代码
-                        warehousename: param.warehousename, // string 仓库名称
-                        warehousetype: undefined === param.warehousetype ? 0 : (param.warehousetype as number), // int32 仓库类型 - 1 厂库  2 自有库  3 合作库
-                        provinceid: undefined === param.provinceid ? 0 : (param.provinceid as number), // uint64 省
-                        cityid: undefined === param.cityid ? 0 : (param.cityid as number), // uint64 市
-                        districtid: undefined === param.districtid ? 0 : (param.districtid as number), // int32 区
-                        address: param.address, // string 详细地址
-                        contactname: param.contactname, // string 联系人
-                        contactnum: param.contactnum, // string 联系电话
-                    };
-                    warehouseApply(reqParam, loading)
-                        .then((res) => {
-                            cancel();
-                            context.emit('refresh');
-                        })
-                        .catch((err) => {});
-                })
-                .catch((error: ValidateErrorEntity<FormState>) => {
-                    console.log('error', error);
-                });
+            validateAction<FormState>(formRef, formState).then((param) => {
+                const reqParam: WarehouseApplyReq = {
+                    type: 2, // int32 类型 1 新增 2 修改
+                    warehouseid: props.selectedRow.autoid, // uint64 仓库ID
+                    warehousecode: props.selectedRow.warehousecode, // string 仓库代码
+                    warehousename: param.warehousename, // string 仓库名称
+                    warehousetype: undefined === param.warehousetype ? 0 : (param.warehousetype as number), // int32 仓库类型 - 1 厂库  2 自有库  3 合作库
+                    provinceid: undefined === param.provinceid ? 0 : (param.provinceid as number), // uint64 省
+                    cityid: undefined === param.cityid ? 0 : (param.cityid as number), // uint64 市
+                    districtid: undefined === param.districtid ? 0 : (param.districtid as number), // int32 区
+                    address: param.address, // string 详细地址
+                    contactname: param.contactname, // string 联系人
+                    contactnum: param.contactnum, // string 联系电话
+                };
+                warehouseApply(reqParam, loading)
+                    .then((res) => {
+                        cancel();
+                        context.emit('refresh');
+                    })
+                    .catch((err) => {});
+            });
         }
         function provinceChange(id: number) {
             getCityList(id);

+ 3 - 2
src/views/manage/finance-review/components/fundsAudit/index.vue

@@ -57,7 +57,7 @@
               <a-row :gutter="24">
                   <a-col :span="12">
                       <a-form-item label="款项类型">
-                          <span class="white">{{ kxtypeName(selectedRow.kxtype) }}</span>
+                          <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
                       </a-form-item>
                   </a-col>
                   <a-col :span="12">
@@ -95,7 +95,7 @@ import { Modal } from 'ant-design-vue';
 import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
 import Long from 'long';
 import { financeControl } from '@/views/manage/finance-review/components/setup';
-import {kxtypeName} from "@/views/manage/finance-review/setup";
+import {kxtypeName, stateName} from "@/views/manage/finance-review/setup";
 import {getContractTypeName} from "@/views/information/spot-contract/setup";
 import {getPriceTypeName} from "@/views/business/purchase/setup";
 
@@ -178,6 +178,7 @@ export default defineComponent({
             getPriceTypeName,
             getContractTypeName,
             maskClosableFlag,
+            stateName,
         };
     },
 });

+ 3 - 2
src/views/manage/finance-review/components/fundsCancel/index.vue

@@ -53,7 +53,7 @@
               <a-row :gutter="24">
                   <a-col :span="12">
                       <a-form-item label="款项类型">
-                          <span class="white">{{ kxtypeName(selectedRow.kxtype) }}</span>
+                          <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
                       </a-form-item>
                   </a-col>
                   <a-col :span="12">
@@ -91,7 +91,7 @@ import {ContractOperateApplyReq} from "@/services/proto/contract/interface";
 import Long from "long";
 import {financeControl} from "@/views/manage/finance-review/components/setup";
 import {QryBussinessKxRsp} from "@/services/go/ermcp/finance-review/interface";
-import {kxtypeName} from "@/views/manage/finance-review/setup";
+import {kxtypeName, stateName} from "@/views/manage/finance-review/setup";
 import {getPriceTypeName} from "@/views/business/purchase/setup";
 import {getContractTypeName} from "@/views/information/spot-contract/setup";
 
@@ -151,6 +151,7 @@ export default defineComponent({
             getPriceTypeName,
             getContractTypeName,
             back,
+            stateName,
         };
     },
 });

+ 3 - 2
src/views/manage/finance-review/components/fundsDetail/index.vue

@@ -46,7 +46,7 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="款项类型">
-              <span class="white">{{ kxtypeName(selectedRow.kxtype) }}</span>
+              <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -79,7 +79,7 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { getStatusName } from '@/common/constants/enumsName';
 import { formatValue, formatTime } from '@/common/methods';
 import { QryBussinessKxRsp } from '@/services/go/ermcp/finance-review/interface';
-import { kxtypeName } from '@/views/manage/finance-review/setup';
+import {kxtypeName, stateName} from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 
 export default defineComponent({
@@ -111,6 +111,7 @@ export default defineComponent({
             kxtypeName,
             getPriceTypeName,
             getContractTypeName,
+            stateName,
         };
     },
 });

+ 135 - 121
src/views/manage/finance-review/list/funds/index.vue

@@ -1,138 +1,152 @@
 <template>
-  <!-- 管理 - 财务审核 - 款项 -->
-  <div class="business-review-js"
-       :loading="loading">
-    <Filter @search="search">
-      <BtnList :btnList="commonBtn" />
-    </Filter>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- 现货合同类型 -->
-        <template #contractstatus="{ record }">
-          <a>{{ getApplyStatusName(record.applystatus) }}</a>
-        </template>
-        <!-- 合同类型-->
-        <template #contracttype="{ record }">
-          <a>{{ getContractTypeName(record.contracttype) }}</a>
-        </template>
-        <!-- 状态 -->
-        <template #applystatus="{ text }">
-          <a>{{ getApplyStatusName(text) }}</a>
-        </template>
-        <!-- 点价类型 -->
-        <template #operateapplytype="{ text }">
-          <a>{{ operateApplyTypeName(text) }}</a>
-        </template>
-        <!-- 款项类型 -->
-        <template #kxtype="{ text }">
-          <a>{{ kxtypeName(text) }}</a>
-        </template>
+    <!-- 管理 - 财务审核 - 款项 -->
+    <div class="business-review-js"
+         :loading="loading">
+        <Filter @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </Filter>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- 现货合同类型 -->
+                <template #contractstatus="{ record }">
+                    <a>{{ getApplyStatusName(record.applystatus) }}</a>
+                </template>
+                <!-- 合同类型-->
+                <template #contracttype="{ record }">
+                    <a>{{ getContractTypeName(record.contracttype) }}</a>
+                </template>
+                <!-- 状态 -->
+                <template #applystatus="{ text }">
+                    <a>{{ getApplyStatusName(text) }}</a>
+                </template>
+                <!-- 点价类型 -->
+                <template #operateapplytype="{ text }">
+                    <a>{{ operateApplyTypeName(text) }}</a>
+                </template>
+                <!-- 款项类型 -->
+                <template #kxtype="{ record }">
+                    <a>{{ stateName(record.deductamount, record.contracttype) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #buyusernameOrsellusername="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
 
-      </a-table>
-    </contextMenu>
-    <!-- 点价记录详情 -->
-    <FundsDetail :selectedRow="selectedRow"
-                 @refresh="queryTable" />
-    <!-- 交收审核 -->
-    <FundsAudit :selectedRow="selectedRow"
-                @refresh="queryTable" />
-    <!-- 撤销点价登记 -->
-    <FundsCancel :selectedRow="selectedRow"
-                 @refresh="queryTable" />
-  </div>
+
+            </a-table>
+        </contextMenu>
+        <!-- 点价记录详情 -->
+        <FundsDetail :selectedRow="selectedRow"
+                     @refresh="queryTable"/>
+        <!-- 交收审核 -->
+        <FundsAudit :selectedRow="selectedRow"
+                    @refresh="queryTable"/>
+        <!-- 撤销点价登记 -->
+        <FundsCancel :selectedRow="selectedRow"
+                     @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
+        contextMenu,
+        BtnList
+    } from '@/common/export/table';
 
-import { Filter, FundsAudit, FundsCancel, FundsDetail } from '../../components';
+    import {Filter, FundsAudit, FundsCancel, FundsDetail} from '../../components';
 
-import { queryTableList, QryBussinessKxRsp } from './setup';
-import { invoiceStatusName, kxtypeName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
-import { getApplyStatusName } from '@/views/manage/business-review/setup';
-import { getContractTypeName } from '@/views/information/spot-contract/setup';
-import { Column, ColumnType } from '@/common/setup/table';
+    import {queryTableList, QryBussinessKxRsp} from './setup';
+    import {invoiceStatusName, kxtypeName, operateApplyTypeName, stateName} from '@/views/manage/finance-review/setup';
+    import {getApplyStatusName} from '@/views/manage/business-review/setup';
+    import {getContractTypeName} from '@/views/information/spot-contract/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
 
-export default defineComponent({
-    name: 'business-review-js',
-    components: {
-        contextMenu,
-        Filter,
-        BtnList,
-        FundsDetail,
-        FundsAudit,
-        FundsCancel,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QryBussinessKxRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('finance_review_funds', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList({});
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_fincial_aduit_fp', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columnfield === 'buyusernameOrsellusername') {
-                    item.onFilter = (value: string, record: QryBussinessKxRsp) => {
-                        const { contracttype, buyusername, sellusername } = record;
-                        if (contracttype === 1) {
-                            // 采购
-                            return sellusername.includes(value);
-                        } else {
-                            return buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.buyusernameOrsellusername || null;
-                }
+    export default defineComponent({
+        name: 'business-review-js',
+        components: {
+            contextMenu,
+            Filter,
+            BtnList,
+            FundsDetail,
+            FundsAudit,
+            FundsCancel,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<QryBussinessKxRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('finance_review_funds', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList({});
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_fincial_aduit_kx', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columnfield === 'buyusernameOrsellusername') {
+                        item.onFilter = (value: string, record: QryBussinessKxRsp) => {
+                            const {contracttype, buyusername, sellusername} = record;
+                            if (contracttype === 1) {
+                                // 采购
+                                return sellusername.includes(value);
+                            } else {
+                                return buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.buyusernameOrsellusername || null;
+                    }
+                });
             });
-        });
 
-        // 查询
-        function search(value: any) {
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
 
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            invoiceStatusName,
-            getApplyStatusName,
-            operateApplyTypeName,
-            getContractTypeName,
-            kxtypeName,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                invoiceStatusName,
+                getApplyStatusName,
+                operateApplyTypeName,
+                getContractTypeName,
+                kxtypeName,
+                stateName,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.business-review-js {
-}
+    .business-review-js {
+    }
 </style
 >;
 

+ 130 - 118
src/views/manage/finance-review/list/invoice/index.vue

@@ -1,135 +1,147 @@
 <template>
-  <!-- 管理 - 财务审核 - 发票 -->
-  <div class="finance_review_invoice"
-       :loading="loading">
-    <Filter @search="search">
-      <BtnList :btnList="commonBtn" />
-    </Filter>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- 现货合同类型 -->
-        <template #contracttype="{ text }">
-          <a>{{ getContractTypeName(text) }}</a>
-        </template>
-        <!-- 发票类型-->
-        <template #invoicetype="{ record }">
-          <a>{{ invoiceStatusName(record.contracttype) }}</a>
-        </template>
-        <!-- 状态 -->
-        <template #applystatus="{ text }">
-          <a>{{ getApplyStatusName(text) }}</a>
-        </template>
-        <!-- 点价类型 -->
-        <template #operateapplytype="{ text }">
-          <a>{{ operateApplyTypeName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 点价记录详情 -->
-    <InvoiceDetail :selectedRow="selectedRow"
-                   @refresh="queryTable" />
-    <!-- 交收审核 -->
-    <InvoiceAudit :selectedRow="selectedRow"
-                  @refresh="queryTable" />
-    <!-- 撤销点价登记 -->
-    <InvoiceCancel :selectedRow="selectedRow"
-                   @refresh="queryTable" />
-  </div>
+    <!-- 管理 - 财务审核 - 发票 -->
+    <div class="finance_review_invoice"
+         :loading="loading">
+        <Filter @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </Filter>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- 现货合同类型 -->
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+                <!-- 发票类型-->
+                <template #invoicetype="{ record }">
+                    <a>{{ invoiceStatusName(record.contracttype) }}</a>
+                </template>
+                <!-- 状态 -->
+                <template #applystatus="{ text }">
+                    <a>{{ getApplyStatusName(text) }}</a>
+                </template>
+                <!-- 点价类型 -->
+                <template #operateapplytype="{ text }">
+                    <a>{{ operateApplyTypeName(text) }}</a>
+                </template>
+                <!-- 对手方 -->
+                <template #buyusernameOrsellusername="{ record }">
+                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+                </template>
+            </a-table>
+        </contextMenu>
+        <!-- 点价记录详情 -->
+        <InvoiceDetail :selectedRow="selectedRow"
+                       @refresh="queryTable"/>
+        <!-- 交收审核 -->
+        <InvoiceAudit :selectedRow="selectedRow"
+                      @refresh="queryTable"/>
+        <!-- 撤销点价登记 -->
+        <InvoiceCancel :selectedRow="selectedRow"
+                       @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+    import {
+        defineComponent,
+        initData,
+        getTableColumns,
+        getTableEvent,
+        getBtnList,
+        contextMenu,
+        BtnList
+    } from '@/common/export/table';
 
-import { InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter } from '../../components';
+    import {InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter} from '../../components';
 
-import { queryTableList, QryBussinessFpRsp } from './setup';
-import { getContractTypeName } from '@/views/information/spot-contract/setup';
-import { invoiceStatusName, kxtypeName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
-import { getApplyStatusName } from '@/views/manage/business-review/setup';
-import { Column, ColumnType } from '@/common/setup/table';
+    import {queryTableList, QryBussinessFpRsp} from './setup';
+    import {getContractTypeName} from '@/views/information/spot-contract/setup';
+    import {invoiceStatusName, kxtypeName, operateApplyTypeName} from '@/views/manage/finance-review/setup';
+    import {getApplyStatusName} from '@/views/manage/business-review/setup';
+    import {Column, ColumnType} from '@/common/setup/table';
 
-export default defineComponent({
-    name: 'finance_review_invoice',
-    components: {
-        contextMenu,
-        Filter,
-        BtnList,
-        InvoiceDetail,
-        InvoiceAudit,
-        InvoiceCancel,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QryBussinessFpRsp>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('finance_review_invoice', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList({});
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_fincial_aduit_fp', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columnfield === 'buyusernameOrsellusername') {
-                    item.onFilter = (value: string, record: QryBussinessFpRsp) => {
-                        const { contracttype, buyusername, sellusername } = record;
-                        if (contracttype === 1) {
-                            // 采购
-                            return sellusername.includes(value);
-                        } else {
-                            return buyusername.includes(value);
-                        }
-                    };
-                    item.filteredValue = filtered.buyusernameOrsellusername || null;
-                }
+    export default defineComponent({
+        name: 'finance_review_invoice',
+        components: {
+            contextMenu,
+            Filter,
+            BtnList,
+            InvoiceDetail,
+            InvoiceAudit,
+            InvoiceCancel,
+        },
+        setup() {
+            // 表头数据
+            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+            // 表格事件
+            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<QryBussinessFpRsp>({});
+            // 表格操作按钮列表
+            const {commonBtn, forDataBtn} = getBtnList('finance_review_invoice', true);
+            // 表格列表数据
+            const {loading, tableList, queryTable} = queryTableList({});
+            initData(() => {
+                // 获取列表数据
+                queryTable();
+                // 注册表头信息 过滤
+                registerColumn('table_pcweb_fincial_aduit_fp', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
+                    if (e.columnfield === 'buyusernameOrsellusername') {
+                        item.onFilter = (value: string, record: QryBussinessFpRsp) => {
+                            const {contracttype, buyusername, sellusername} = record;
+                            if (contracttype === 1) {
+                                // 采购
+                                return sellusername.includes(value);
+                            } else {
+                                return buyusername.includes(value);
+                            }
+                        };
+                        item.filteredValue = filtered.buyusernameOrsellusername || null;
+                    }
+                });
             });
-        });
 
-        // 查询
-        function search(value: any) {
-            console.log('value', value);
+            // 查询
+            function search(value: any) {
+                console.log('value', value);
 
-            filteredInfo.value = value;
-            // 更新表信息
-            updateColumn();
-        }
+                filteredInfo.value = value;
+                // 更新表信息
+                updateColumn();
+            }
 
-        return {
-            columns,
-            filteredInfo,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            getContractTypeName,
-            invoiceStatusName,
-            getApplyStatusName,
-            operateApplyTypeName,
-            kxtypeName,
-        };
-    },
-});
+            return {
+                columns,
+                filteredInfo,
+                expandedRowKeys,
+                selectedRow,
+                Rowclick,
+                commonBtn,
+                forDataBtn,
+                loading,
+                tableList,
+                search,
+                getContractTypeName,
+                invoiceStatusName,
+                getApplyStatusName,
+                operateApplyTypeName,
+                kxtypeName,
+            };
+        },
+    });
 </script>
 
 <style lang="less">
-.finance_review_invoice {
-}
+    .finance_review_invoice {
+    }
 </style
 >;
 

+ 19 - 0
src/views/manage/finance-review/setup.ts

@@ -64,6 +64,25 @@ export function kxtypeName(type: number): string {
     return result
 }
 
+/**
+ * 付款
+ * @param deductamount
+ * @param contracttype
+ */
+export function stateName(deductamount: number, contracttype: number) {
+    let result = "--";
+    if(deductamount === undefined || deductamount === 0){
+        if(contracttype === 1){  // 采购
+            result = "付款"
+        }else{
+            result = "收款"
+        }
+    }else{
+        result = "退款"
+    }
+    return result;
+}
+
 // 提示
 export const financeSign = new Map<number, ResultInfo>([
     [2, ['审核通过成功', '审核失败:']],

+ 0 - 5
src/views/manage/inventory-review/components/checkoutCancel/index.vue

@@ -145,15 +145,11 @@
 <script lang="ts">
 import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/common/constants/enumsName';
 import { formatValue, formatTime } from '@/common/methods';
 import { Ermcp3AreaStockApply } from '@/services/go/ermcp/inventory-review/interface';
 import { Modal } from 'ant-design-vue';
-import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
 import Long from 'long';
-import { financeControl } from '@/views/manage/finance-review/components/setup';
 import { AuditERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
@@ -220,7 +216,6 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
-
             isShowContractInfo,
             getContractTypeName,
             getPriceTypeName,