12 Commits

Author SHA1 Message Date
f057f07ce7 feat: 🚀 修复bug 2025-10-14 17:46:22 +08:00
54522f7ca2 feat: 🚀 入库单添加弹窗 2025-10-14 16:30:16 +08:00
c18746fcf5 fix: 🧩 修復bug 2025-10-14 09:31:12 +08:00
ef38880743 fix: 🧩 修复bug 2025-10-11 10:51:20 +08:00
190be3b7ce fix: 🧩 修复BUG 2025-10-10 16:58:14 +08:00
efee846973 fix: 🧩 修改bug 2025-10-10 11:28:56 +08:00
2837efee97 feat: 🚀 发布测试环境 2025-09-28 16:11:10 +08:00
7b4e4f81d2 feat: 🚀 物料列表刷新 2025-09-25 17:20:06 +08:00
629232a243 feat(api): 🚀 入库单列表 2025-09-24 17:27:03 +08:00
b9c5ded6ec feat: 🚀 表格宽度调整 2025-09-17 16:06:20 +08:00
e259886cbc feat: 🚀 文字调整 2025-09-17 14:44:49 +08:00
1068e87671 feat: 🚀 sass导入更新 2025-09-16 17:04:55 +08:00
58 changed files with 858 additions and 475 deletions

View File

@@ -1,14 +1,14 @@
ENV = 'test'
ENV = 'dev'
VITE_APP_API_VERSION =""
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
VITE_APP_SSO_LOGINURL = http://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
VITE_APP_SSO_LOGINURL = https://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
VITE_APP_SSO_APPID = 101341644040699904
VITE_REDIRECT_URL =http://localhost:8080/login #单点从定向地址
VITE_SINGLE_URL = https://dev.uc.v3.f2b211.com/ #测试环境单点登录通知
# 测试环境
VITE_USER_NODE_ENV = test
VITE_USER_NODE_ENV = development
# 公共基础路径
VITE_PUBLIC_PATH = /

View File

@@ -1,10 +1,10 @@
ENV = 'production'
VITE_APP_API_VERSION = "" #版本号
VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址
VITE_APP_SSO_LOGINURL = http://uc.v3.f2b211.com/uc/login
VITE_APP_SSO_LOGINURL = https://uc.v3.f2b211.com/uc/login
VITE_APP_SSO_APPID = 100664627590856707
VITE_REDIRECT_URL = https://opsscm.f2b211.com/login #单点从定向地址
VITE_REDIRECT_URL = https://wms.v2.f2b211.com/login #单点从定向地址
VITE_SINGLE_URL = https://uc.v3.f2b211.com/ #单点登录通知
# 线上环境
VITE_USER_NODE_ENV = production

View File

@@ -1,7 +1,7 @@
ENV = 'test'
VITE_APP_API_VERSION =""
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/admapi/
VITE_APP_SSO_LOGINURL = http://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
VITE_APP_SSO_LOGINURL = https://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
VITE_APP_SSO_APPID = 101341644040699904
VITE_REDIRECT_URL =https://dev.wms.v2.f2b211.com/login #单点从定向地址

View File

@@ -1,40 +1,40 @@
// @see: https://stylelint.io
module.exports = {
root: true,
// 继承某些已有的规则
extends: [
"stylelint-config-standard", // 配置 stylelint 拓展插件
"stylelint-config-html/vue", // 配置 vue 中 template 样式格式化
"stylelint-config-standard-scss", // 配置 stylelint scss 插件
"stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化
"stylelint-config-recess-order" // 配置 stylelint css 属性书写顺序插件,
],
overrides: [
// 扫描 .vue/html 文件中的 <style> 标签内的样式
{
files: ["**/*.{vue,html}"],
customSyntax: "postcss-html"
}
],
rules: {
"function-url-quotes": "always", // URL 的引号 "always(必须加上引号)"|"never(没有引号)"
"color-hex-length": "long", // 指定 16 进制颜色的简写或扩写 "short(16进制简写)"|"long(16进制扩写)"
"rule-empty-line-before": "never", // 要求或禁止在规则之前的空行 "always(规则之前必须始终有一个空行)"|"never(规则前绝不能有空行)"|"always-multi-line(多行规则之前必须始终有一个空行)"|"never-multi-line(多行规则之前绝不能有空行)"
"font-family-no-missing-generic-family-keyword": null, // 禁止在字体族名称列表中缺少通用字体族关键字
"scss/at-import-partial-extension": null, // 解决不能使用 @import 引入 scss 文件
"property-no-unknown": null, // 禁止未知的属性
"no-empty-source": null, // 禁止空源码
"selector-class-pattern": null, // 强制选择器类名的格式
"value-no-vendor-prefix": null, // 关闭 vendor-prefix (为了解决多行省略 -webkit-box)
"no-descending-specificity": null, // 不允许较低特异性的选择器出现在覆盖较高特异性的选择器
"value-keyword-case": null, // 解决在 scss 中使用 v-bind 大写单词报错
"selector-pseudo-class-no-unknown": [
true,
{
ignorePseudoClasses: ["global", "v-deep", "deep"]
}
]
},
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"]
root: true,
// 继承某些已有的规则
extends: [
"stylelint-config-standard", // 配置 stylelint 拓展插件
"stylelint-config-html/vue", // 配置 vue 中 template 样式格式化
"stylelint-config-standard-scss", // 配置 stylelint scss 插件
"stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化
"stylelint-config-recess-order" // 配置 stylelint css 属性书写顺序插件,
],
overrides: [
// 扫描 .vue/html 文件中的 <style> 标签内的样式
{
files: ["**/*.{vue,html}"],
customSyntax: "postcss-html"
}
],
rules: {
"function-url-quotes": "always", // URL 的引号 "always(必须加上引号)"|"never(没有引号)"
"color-hex-length": "long", // 指定 16 进制颜色的简写或扩写 "short(16进制简写)"|"long(16进制扩写)"
"rule-empty-line-before": "never", // 要求或禁止在规则之前的空行 "always(规则之前必须始终有一个空行)"|"never(规则前绝不能有空行)"|"always-multi-line(多行规则之前必须始终有一个空行)"|"never-multi-line(多行规则之前绝不能有空行)"
"font-family-no-missing-generic-family-keyword": null, // 禁止在字体族名称列表中缺少通用字体族关键字
"scss/at-import-partial-extension": null, // 解决不能使用 @use 引入 scss 文件
"property-no-unknown": null, // 禁止未知的属性
"no-empty-source": null, // 禁止空源码
"selector-class-pattern": null, // 强制选择器类名的格式
"value-no-vendor-prefix": null, // 关闭 vendor-prefix (为了解决多行省略 -webkit-box)
"no-descending-specificity": null, // 不允许较低特异性的选择器出现在覆盖较高特异性的选择器
"value-keyword-case": null, // 解决在 scss 中使用 v-bind 大写单词报错
"selector-pseudo-class-no-unknown": [
true,
{
ignorePseudoClasses: ["global", "v-deep", "deep"]
}
]
},
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"]
};

View File

@@ -21,7 +21,6 @@
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@types/decimal.js": "^7.4.0",
"@vueuse/core": "^10.1.2",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
@@ -56,8 +55,10 @@
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@iconify-json/ep": "^1.1.10",
"@types/decimal.js": "^7.4.0",
"@types/file-saver": "^2.0.5",
"@types/js-md5": "^0.7.0",
"@types/lodash-es": "^4.17.12",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.7",
"@types/sortablejs": "^1.15.1",
@@ -88,7 +89,7 @@
"stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-config-standard-scss": "^9.0.0",
"typescript": "^5.0.2",
"typescript": "5.0.2",
"unplugin-auto-import": "^0.16.4",
"unplugin-icons": "^0.16.3",
"unplugin-vue-components": "^0.25.1",

303
pnpm-lock.yaml generated
View File

@@ -10,19 +10,16 @@ importers:
dependencies:
'@element-plus/icons-vue':
specifier: ^2.1.0
version: 2.3.2(vue@3.5.21(typescript@5.9.2))
'@types/decimal.js':
specifier: ^7.4.0
version: 7.4.3
version: 2.3.2(vue@3.5.21(typescript@5.0.2))
'@vueuse/core':
specifier: ^10.1.2
version: 10.11.1(vue@3.5.21(typescript@5.9.2))
version: 10.11.1(vue@3.5.21(typescript@5.0.2))
'@wangeditor/editor':
specifier: ^5.1.23
version: 5.1.23
'@wangeditor/editor-for-vue':
specifier: ^5.1.12
version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.21(typescript@5.9.2))
version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.21(typescript@5.0.2))
async-validator:
specifier: ^4.2.5
version: 4.2.5
@@ -46,7 +43,7 @@ importers:
version: 0.9.8
element-plus:
specifier: ^2.3.4
version: 2.11.2(vue@3.5.21(typescript@5.9.2))
version: 2.11.2(vue@3.5.21(typescript@5.0.2))
file-saver:
specifier: ^2.0.5
version: 2.0.5
@@ -70,10 +67,10 @@ importers:
version: 0.2.0
pinia:
specifier: ^2.1.3
version: 2.3.1(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2))
version: 2.3.1(typescript@5.0.2)(vue@3.5.21(typescript@5.0.2))
pinia-plugin-persistedstate:
specifier: ^3.1.0
version: 3.2.3(pinia@2.3.1(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2)))
version: 3.2.3(pinia@2.3.1(typescript@5.0.2)(vue@3.5.21(typescript@5.0.2)))
print-js:
specifier: ^1.6.0
version: 1.6.0
@@ -85,16 +82,16 @@ importers:
version: 1.15.6
vue:
specifier: ^3.3.4
version: 3.5.21(typescript@5.9.2)
version: 3.5.21(typescript@5.0.2)
vue-router:
specifier: ^4.2.2
version: 4.5.1(vue@3.5.21(typescript@5.9.2))
version: 4.5.1(vue@3.5.21(typescript@5.0.2))
vuedraggable:
specifier: ^4.1.0
version: 4.1.0(vue@3.5.21(typescript@5.9.2))
version: 4.1.0(vue@3.5.21(typescript@5.0.2))
vxe-table:
specifier: ^4.5.0-beta.10
version: 4.16.12(vue@3.5.21(typescript@5.9.2))
version: 4.16.12(vue@3.5.21(typescript@5.0.2))
xe-utils:
specifier: ^3.5.11
version: 3.7.9
@@ -111,12 +108,18 @@ importers:
'@iconify-json/ep':
specifier: ^1.1.10
version: 1.2.3
'@types/decimal.js':
specifier: ^7.4.0
version: 7.4.3
'@types/file-saver':
specifier: ^2.0.5
version: 2.0.7
'@types/js-md5':
specifier: ^0.7.0
version: 0.7.2
'@types/lodash-es':
specifier: ^4.17.12
version: 4.17.12
'@types/nprogress':
specifier: ^0.2.0
version: 0.2.3
@@ -128,16 +131,16 @@ importers:
version: 1.15.8
'@typescript-eslint/eslint-plugin':
specifier: ^5.59.7
version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2)
version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.0.2))(eslint@8.57.1)(typescript@5.0.2)
'@typescript-eslint/parser':
specifier: ^5.59.7
version: 5.62.0(eslint@8.57.1)(typescript@5.9.2)
version: 5.62.0(eslint@8.57.1)(typescript@5.0.2)
'@vitejs/plugin-vue':
specifier: ^4.2.3
version: 4.6.2(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.9.2))
version: 4.6.2(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.0.2))
'@vitejs/plugin-vue-jsx':
specifier: ^3.0.1
version: 3.1.0(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.9.2))
version: 3.1.0(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.0.2))
autoprefixer:
specifier: ^10.4.14
version: 10.4.21(postcss@8.5.6)
@@ -188,37 +191,37 @@ importers:
version: 9.5.0
stylelint:
specifier: ^15.6.2
version: 15.11.0(typescript@5.9.2)
version: 15.11.0(typescript@5.0.2)
stylelint-config-html:
specifier: ^1.1.0
version: 1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.9.2))
version: 1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recess-order:
specifier: ^4.0.0
version: 4.6.0(stylelint@15.11.0(typescript@5.9.2))
version: 4.6.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recommended-scss:
specifier: ^12.0.0
version: 12.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2))
version: 12.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recommended-vue:
specifier: ^1.4.0
version: 1.6.1(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.9.2))
version: 1.6.1(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-standard:
specifier: ^33.0.0
version: 33.0.0(stylelint@15.11.0(typescript@5.9.2))
version: 33.0.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-standard-scss:
specifier: ^9.0.0
version: 9.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2))
version: 9.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2))
typescript:
specifier: ^5.0.2
version: 5.9.2
specifier: 5.0.2
version: 5.0.2
unplugin-auto-import:
specifier: ^0.16.4
version: 0.16.7(@vueuse/core@10.11.1(vue@3.5.21(typescript@5.9.2)))(rollup@2.79.2)
version: 0.16.7(@vueuse/core@10.11.1(vue@3.5.21(typescript@5.0.2)))(rollup@2.79.2)
unplugin-icons:
specifier: ^0.16.3
version: 0.16.6(@vue/compiler-sfc@3.5.21)(vue-template-compiler@2.7.16)
unplugin-vue-components:
specifier: ^0.25.1
version: 0.25.2(@babel/parser@7.28.4)(rollup@2.79.2)(vue@3.5.21(typescript@5.9.2))
version: 0.25.2(@babel/parser@7.28.4)(rollup@2.79.2)(vue@3.5.21(typescript@5.0.2))
unplugin-vue-setup-extend-plus:
specifier: ^1.0.0
version: 1.0.1
@@ -242,7 +245,7 @@ importers:
version: 2.0.1(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))
vue-tsc:
specifier: ^1.6.5
version: 1.8.27(typescript@5.9.2)
version: 1.8.27(typescript@5.0.2)
packages:
@@ -4809,6 +4812,11 @@ packages:
typedarray@0.0.6:
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
typescript@5.0.2:
resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==}
engines: {node: '>=12.20'}
hasBin: true
typescript@5.9.2:
resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==}
engines: {node: '>=14.17'}
@@ -6006,7 +6014,7 @@ snapshots:
'@types/node': 20.5.1
chalk: 4.1.2
cosmiconfig: 8.3.6(typescript@5.9.2)
cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.9.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.9.2))(typescript@5.9.2)
cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.0.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.0.2))(typescript@5.9.2)
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
@@ -6081,9 +6089,9 @@ snapshots:
'@ctrl/tinycolor@3.6.1': {}
'@element-plus/icons-vue@2.3.2(vue@3.5.21(typescript@5.9.2))':
'@element-plus/icons-vue@2.3.2(vue@3.5.21(typescript@5.0.2))':
dependencies:
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
'@esbuild/android-arm64@0.18.20':
optional: true
@@ -6445,34 +6453,34 @@ snapshots:
'@types/web-bluetooth@0.0.20': {}
'@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2)':
'@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.0.2))(eslint@8.57.1)(typescript@5.0.2)':
dependencies:
'@eslint-community/regexpp': 4.12.1
'@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.9.2)
'@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.0.2)
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.9.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.9.2)
'@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.0.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.0.2)
debug: 4.4.3
eslint: 8.57.1
graphemer: 1.4.0
ignore: 5.3.2
natural-compare-lite: 1.4.0
semver: 7.7.2
tsutils: 3.21.0(typescript@5.9.2)
tsutils: 3.21.0(typescript@5.0.2)
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2)':
'@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.0.2)':
dependencies:
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.2)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.2)
debug: 4.4.3
eslint: 8.57.1
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
transitivePeerDependencies:
- supports-color
@@ -6481,21 +6489,21 @@ snapshots:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
'@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@5.9.2)':
'@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@5.0.2)':
dependencies:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.9.2)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.0.2)
debug: 4.4.3
eslint: 8.57.1
tsutils: 3.21.0(typescript@5.9.2)
tsutils: 3.21.0(typescript@5.0.2)
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@5.62.0': {}
'@typescript-eslint/typescript-estree@5.62.0(typescript@5.9.2)':
'@typescript-eslint/typescript-estree@5.62.0(typescript@5.0.2)':
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
@@ -6503,20 +6511,20 @@ snapshots:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.7.2
tsutils: 3.21.0(typescript@5.9.2)
tsutils: 3.21.0(typescript@5.0.2)
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.9.2)':
'@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.0.2)':
dependencies:
'@eslint-community/eslint-utils': 4.9.0(eslint@8.57.1)
'@types/json-schema': 7.0.15
'@types/semver': 7.7.1
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.2)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.2)
eslint: 8.57.1
eslint-scope: 5.1.1
semver: 7.7.2
@@ -6560,20 +6568,20 @@ snapshots:
'@uppy/utils': 4.1.3
nanoid: 3.3.11
'@vitejs/plugin-vue-jsx@3.1.0(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.9.2))':
'@vitejs/plugin-vue-jsx@3.1.0(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.0.2))':
dependencies:
'@babel/core': 7.28.4
'@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.4)
'@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.4)
vite: 4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0)
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
transitivePeerDependencies:
- supports-color
'@vitejs/plugin-vue@4.6.2(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.9.2))':
'@vitejs/plugin-vue@4.6.2(vite@4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0))(vue@3.5.21(typescript@5.0.2))':
dependencies:
vite: 4.5.14(@types/node@20.5.1)(sass@1.92.1)(terser@5.44.0)
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
'@volar/language-core@1.11.1':
dependencies:
@@ -6649,7 +6657,7 @@ snapshots:
'@vue/devtools-api@6.6.4': {}
'@vue/language-core@1.8.27(typescript@5.9.2)':
'@vue/language-core@1.8.27(typescript@5.0.2)':
dependencies:
'@volar/language-core': 1.11.1
'@volar/source-map': 1.11.1
@@ -6661,7 +6669,7 @@ snapshots:
path-browserify: 1.0.1
vue-template-compiler: 2.7.16
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
'@vue/reactivity@3.5.21':
dependencies:
@@ -6679,30 +6687,30 @@ snapshots:
'@vue/shared': 3.5.21
csstype: 3.1.3
'@vue/server-renderer@3.5.21(vue@3.5.21(typescript@5.9.2))':
'@vue/server-renderer@3.5.21(vue@3.5.21(typescript@5.0.2))':
dependencies:
'@vue/compiler-ssr': 3.5.21
'@vue/shared': 3.5.21
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
'@vue/shared@3.5.21': {}
'@vueuse/core@10.11.1(vue@3.5.21(typescript@5.9.2))':
'@vueuse/core@10.11.1(vue@3.5.21(typescript@5.0.2))':
dependencies:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 10.11.1
'@vueuse/shared': 10.11.1(vue@3.5.21(typescript@5.9.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.9.2))
'@vueuse/shared': 10.11.1(vue@3.5.21(typescript@5.0.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/core@9.13.0(vue@3.5.21(typescript@5.9.2))':
'@vueuse/core@9.13.0(vue@3.5.21(typescript@5.0.2))':
dependencies:
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 9.13.0
'@vueuse/shared': 9.13.0(vue@3.5.21(typescript@5.9.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.9.2))
'@vueuse/shared': 9.13.0(vue@3.5.21(typescript@5.0.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -6711,24 +6719,24 @@ snapshots:
'@vueuse/metadata@9.13.0': {}
'@vueuse/shared@10.11.1(vue@3.5.21(typescript@5.9.2))':
'@vueuse/shared@10.11.1(vue@3.5.21(typescript@5.0.2))':
dependencies:
vue-demi: 0.14.10(vue@3.5.21(typescript@5.9.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/shared@9.13.0(vue@3.5.21(typescript@5.9.2))':
'@vueuse/shared@9.13.0(vue@3.5.21(typescript@5.0.2))':
dependencies:
vue-demi: 0.14.10(vue@3.5.21(typescript@5.9.2))
vue-demi: 0.14.10(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vxe-ui/core@4.2.12(vue@3.5.21(typescript@5.9.2))':
'@vxe-ui/core@4.2.12(vue@3.5.21(typescript@5.0.2))':
dependencies:
dom-zindex: 1.0.6
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
xe-utils: 3.7.9
'@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.11)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.11)(slate@0.72.8)(snabbdom@3.6.2)':
@@ -6772,10 +6780,10 @@ snapshots:
slate-history: 0.66.0(slate@0.72.8)
snabbdom: 3.6.2
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.21(typescript@5.9.2))':
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.21(typescript@5.0.2))':
dependencies:
'@wangeditor/editor': 5.1.23
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
'@wangeditor/editor@5.1.23':
dependencies:
@@ -7404,13 +7412,22 @@ snapshots:
object-assign: 4.1.1
vary: 1.1.2
cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.9.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.9.2))(typescript@5.9.2):
cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.0.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.0.2))(typescript@5.9.2):
dependencies:
'@types/node': 20.5.1
cosmiconfig: 8.3.6(typescript@5.9.2)
ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.9.2)
typescript: 5.9.2
cosmiconfig@8.3.6(typescript@5.0.2):
dependencies:
import-fresh: 3.3.1
js-yaml: 4.1.0
parse-json: 5.2.0
path-type: 4.0.0
optionalDependencies:
typescript: 5.0.2
cosmiconfig@8.3.6(typescript@5.9.2):
dependencies:
import-fresh: 3.3.1
@@ -7668,15 +7685,15 @@ snapshots:
electron-to-chromium@1.5.218: {}
element-plus@2.11.2(vue@3.5.21(typescript@5.9.2)):
element-plus@2.11.2(vue@3.5.21(typescript@5.0.2)):
dependencies:
'@ctrl/tinycolor': 3.6.1
'@element-plus/icons-vue': 2.3.2(vue@3.5.21(typescript@5.9.2))
'@element-plus/icons-vue': 2.3.2(vue@3.5.21(typescript@5.0.2))
'@floating-ui/dom': 1.7.4
'@popperjs/core': '@sxzz/popperjs-es@2.11.7'
'@types/lodash': 4.17.20
'@types/lodash-es': 4.17.12
'@vueuse/core': 9.13.0(vue@3.5.21(typescript@5.9.2))
'@vueuse/core': 9.13.0(vue@3.5.21(typescript@5.0.2))
async-validator: 4.2.5
dayjs: 1.11.18
escape-html: 1.0.3
@@ -7685,7 +7702,7 @@ snapshots:
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21)
memoize-one: 6.0.0
normalize-wheel-es: 1.2.0
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
transitivePeerDependencies:
- '@vue/composition-api'
@@ -9258,17 +9275,17 @@ snapshots:
pify@3.0.0: {}
pinia-plugin-persistedstate@3.2.3(pinia@2.3.1(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2))):
pinia-plugin-persistedstate@3.2.3(pinia@2.3.1(typescript@5.0.2)(vue@3.5.21(typescript@5.0.2))):
dependencies:
pinia: 2.3.1(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2))
pinia: 2.3.1(typescript@5.0.2)(vue@3.5.21(typescript@5.0.2))
pinia@2.3.1(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2)):
pinia@2.3.1(typescript@5.0.2)(vue@3.5.21(typescript@5.0.2)):
dependencies:
'@vue/devtools-api': 6.6.4
vue: 3.5.21(typescript@5.9.2)
vue-demi: 0.14.10(vue@3.5.21(typescript@5.9.2))
vue: 3.5.21(typescript@5.0.2)
vue-demi: 0.14.10(vue@3.5.21(typescript@5.0.2))
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
transitivePeerDependencies:
- '@vue/composition-api'
@@ -9972,87 +9989,87 @@ snapshots:
style-search@0.1.0: {}
stylelint-config-html@1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-html@1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss-html: 1.8.0
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recess-order@4.6.0(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recess-order@4.6.0(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
stylelint: 15.11.0(typescript@5.9.2)
stylelint-order: 6.0.4(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-order: 6.0.4(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recommended-scss@11.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recommended-scss@11.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss-scss: 4.0.9(postcss@8.5.6)
stylelint: 15.11.0(typescript@5.9.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.9.2))
stylelint-scss: 4.7.0(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-scss: 4.7.0(stylelint@15.11.0(typescript@5.0.2))
optionalDependencies:
postcss: 8.5.6
stylelint-config-recommended-scss@12.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recommended-scss@12.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss-scss: 4.0.9(postcss@8.5.6)
stylelint: 15.11.0(typescript@5.9.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.9.2))
stylelint-scss: 5.3.2(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-scss: 5.3.2(stylelint@15.11.0(typescript@5.0.2))
optionalDependencies:
postcss: 8.5.6
stylelint-config-recommended-vue@1.6.1(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recommended-vue@1.6.1(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss-html: 1.8.0
semver: 7.7.2
stylelint: 15.11.0(typescript@5.9.2)
stylelint-config-html: 1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.9.2))
stylelint-config-recommended: 17.0.0(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-html: 1.1.0(postcss-html@1.8.0)(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recommended: 17.0.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-recommended@12.0.0(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recommended@12.0.0(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recommended@17.0.0(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-recommended@17.0.0(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-standard-scss@9.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-standard-scss@9.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
stylelint: 15.11.0(typescript@5.9.2)
stylelint-config-recommended-scss: 11.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.9.2))
stylelint-config-standard: 33.0.0(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recommended-scss: 11.0.0(postcss@8.5.6)(stylelint@15.11.0(typescript@5.0.2))
stylelint-config-standard: 33.0.0(stylelint@15.11.0(typescript@5.0.2))
optionalDependencies:
postcss: 8.5.6
stylelint-config-standard@33.0.0(stylelint@15.11.0(typescript@5.9.2)):
stylelint-config-standard@33.0.0(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
stylelint: 15.11.0(typescript@5.9.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.9.2))
stylelint: 15.11.0(typescript@5.0.2)
stylelint-config-recommended: 12.0.0(stylelint@15.11.0(typescript@5.0.2))
stylelint-order@6.0.4(stylelint@15.11.0(typescript@5.9.2)):
stylelint-order@6.0.4(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss: 8.5.6
postcss-sorting: 8.0.2(postcss@8.5.6)
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint-scss@4.7.0(stylelint@15.11.0(typescript@5.9.2)):
stylelint-scss@4.7.0(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.6
postcss-selector-parser: 6.1.2
postcss-value-parser: 4.2.0
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint-scss@5.3.2(stylelint@15.11.0(typescript@5.9.2)):
stylelint-scss@5.3.2(stylelint@15.11.0(typescript@5.0.2)):
dependencies:
known-css-properties: 0.29.0
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.6
postcss-selector-parser: 6.1.2
postcss-value-parser: 4.2.0
stylelint: 15.11.0(typescript@5.9.2)
stylelint: 15.11.0(typescript@5.0.2)
stylelint@15.11.0(typescript@5.9.2):
stylelint@15.11.0(typescript@5.0.2):
dependencies:
'@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1)
'@csstools/css-tokenizer': 2.4.1
@@ -10060,7 +10077,7 @@ snapshots:
'@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.2)
balanced-match: 2.0.0
colord: 2.9.3
cosmiconfig: 8.3.6(typescript@5.9.2)
cosmiconfig: 8.3.6(typescript@5.0.2)
css-functions-list: 3.2.3
css-tree: 2.3.1
debug: 4.4.3
@@ -10248,10 +10265,10 @@ snapshots:
tslib@2.8.1: {}
tsutils@3.21.0(typescript@5.9.2):
tsutils@3.21.0(typescript@5.0.2):
dependencies:
tslib: 1.14.1
typescript: 5.9.2
typescript: 5.0.2
type-check@0.4.0:
dependencies:
@@ -10317,6 +10334,8 @@ snapshots:
typedarray@0.0.6: {}
typescript@5.0.2: {}
typescript@5.9.2: {}
ufo@1.6.1: {}
@@ -10376,7 +10395,7 @@ snapshots:
universalify@2.0.1: {}
unplugin-auto-import@0.16.7(@vueuse/core@10.11.1(vue@3.5.21(typescript@5.9.2)))(rollup@2.79.2):
unplugin-auto-import@0.16.7(@vueuse/core@10.11.1(vue@3.5.21(typescript@5.0.2)))(rollup@2.79.2):
dependencies:
'@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.3.0(rollup@2.79.2)
@@ -10387,7 +10406,7 @@ snapshots:
unimport: 3.14.6(rollup@2.79.2)
unplugin: 1.16.1
optionalDependencies:
'@vueuse/core': 10.11.1(vue@3.5.21(typescript@5.9.2))
'@vueuse/core': 10.11.1(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- rollup
@@ -10406,7 +10425,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
unplugin-vue-components@0.25.2(@babel/parser@7.28.4)(rollup@2.79.2)(vue@3.5.21(typescript@5.9.2)):
unplugin-vue-components@0.25.2(@babel/parser@7.28.4)(rollup@2.79.2)(vue@3.5.21(typescript@5.0.2)):
dependencies:
'@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.3.0(rollup@2.79.2)
@@ -10418,7 +10437,7 @@ snapshots:
minimatch: 9.0.5
resolve: 1.22.10
unplugin: 1.16.1
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
optionalDependencies:
'@babel/parser': 7.28.4
transitivePeerDependencies:
@@ -10537,9 +10556,9 @@ snapshots:
sass: 1.92.1
terser: 5.44.0
vue-demi@0.14.10(vue@3.5.21(typescript@5.9.2)):
vue-demi@0.14.10(vue@3.5.21(typescript@5.0.2)):
dependencies:
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
vue-eslint-parser@9.4.3(eslint@8.57.1):
dependencies:
@@ -10554,47 +10573,47 @@ snapshots:
transitivePeerDependencies:
- supports-color
vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)):
vue-router@4.5.1(vue@3.5.21(typescript@5.0.2)):
dependencies:
'@vue/devtools-api': 6.6.4
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
vue-template-compiler@2.7.16:
dependencies:
de-indent: 1.0.2
he: 1.2.0
vue-tsc@1.8.27(typescript@5.9.2):
vue-tsc@1.8.27(typescript@5.0.2):
dependencies:
'@volar/typescript': 1.11.1
'@vue/language-core': 1.8.27(typescript@5.9.2)
'@vue/language-core': 1.8.27(typescript@5.0.2)
semver: 7.7.2
typescript: 5.9.2
typescript: 5.0.2
vue@3.5.21(typescript@5.9.2):
vue@3.5.21(typescript@5.0.2):
dependencies:
'@vue/compiler-dom': 3.5.21
'@vue/compiler-sfc': 3.5.21
'@vue/runtime-dom': 3.5.21
'@vue/server-renderer': 3.5.21(vue@3.5.21(typescript@5.9.2))
'@vue/server-renderer': 3.5.21(vue@3.5.21(typescript@5.0.2))
'@vue/shared': 3.5.21
optionalDependencies:
typescript: 5.9.2
typescript: 5.0.2
vuedraggable@4.1.0(vue@3.5.21(typescript@5.9.2)):
vuedraggable@4.1.0(vue@3.5.21(typescript@5.0.2)):
dependencies:
sortablejs: 1.14.0
vue: 3.5.21(typescript@5.9.2)
vue: 3.5.21(typescript@5.0.2)
vxe-pc-ui@4.9.30(vue@3.5.21(typescript@5.9.2)):
vxe-pc-ui@4.9.30(vue@3.5.21(typescript@5.0.2)):
dependencies:
'@vxe-ui/core': 4.2.12(vue@3.5.21(typescript@5.9.2))
'@vxe-ui/core': 4.2.12(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- vue
vxe-table@4.16.12(vue@3.5.21(typescript@5.9.2)):
vxe-table@4.16.12(vue@3.5.21(typescript@5.0.2)):
dependencies:
vxe-pc-ui: 4.9.30(vue@3.5.21(typescript@5.9.2))
vxe-pc-ui: 4.9.30(vue@3.5.21(typescript@5.0.2))
transitivePeerDependencies:
- vue

View File

@@ -60,8 +60,17 @@ class RequestHttp {
this.service.interceptors.response.use(
(response: AxiosResponse) => {
const { data } = response;
// const userStore = useUserStore();
tryHideFullScreenLoading();
// 获取响应头中的 Authorization 信息
const authorization = response.headers["authorization"];
//刷新token
if (authorization) {
// 可以在这里更新用户的 token 信息
const userStore = useUserStore();
userStore.setToken(authorization);
return data;
}
// 登陆失效
if (data.code == 401) {
ElMessage.error(data.msg || data.message);

View File

@@ -6,5 +6,15 @@ import http from "@/api";
//物料分页列表
export const getMaterialListApi = (params: any) => {
if (params.disabled && params.disabled === "启用") {
params.disabled = 0;
}
return http.get<any>(`material`, params);
};
//刷新 /admapi/material/reload
export const getMaterialListReloadApi = (params: any) => {
return http.get<any>(`material/reload`, params);
};
export const getMaterialListExportApi = (params: any) => {
return http.get<any>(`material/export`, params);
};

View File

@@ -24,3 +24,8 @@ export const getUsersApi = (params: any) => {
export const getProductLinesApi = (params: any) => {
return http.get<any>(`basicinfo/productlines`, params);
};
//仓库
export const getWarehousesListApi = () => {
return http.get<any>(`basicinfo/warehouses`);
};

View File

@@ -0,0 +1,16 @@
import http from "@/api";
//订阅入庫單列表 /admapi/subscribe /admapi/subscribe/wrr
export const getSubscribeWrrListApi = (params: any) => {
if (params?.notif_ret_status === "空") {
params.notif_ret_status = 0;
}
return http.get<any>(`subscribe/wrr`, params);
};
//订阅入库单刷新
export const getSubscribeResetListApi = (params: any) => {
return http.get<any>(`subscribe/wrr/reload`, params);
};
export const getSubscribeResetListExportApi = (params: any) => {
return http.get<any>(`subscribe/wrr/export`, params);
};

23
src/auto-import.d.ts vendored
View File

@@ -1,6 +1,7 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
@@ -37,6 +38,7 @@ declare global {
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
const onUnmounted: typeof import("vue")["onUnmounted"];
const onUpdated: typeof import("vue")["onUpdated"];
const onWatcherCleanup: typeof import("vue")["onWatcherCleanup"];
const provide: typeof import("vue")["provide"];
const reactive: typeof import("vue")["reactive"];
const readonly: typeof import("vue")["readonly"];
@@ -54,10 +56,13 @@ declare global {
const useAttrs: typeof import("vue")["useAttrs"];
const useCssModule: typeof import("vue")["useCssModule"];
const useCssVars: typeof import("vue")["useCssVars"];
const useId: typeof import("vue")["useId"];
const useLink: typeof import("vue-router")["useLink"];
const useModel: typeof import("vue")["useModel"];
const useRoute: typeof import("vue-router")["useRoute"];
const useRouter: typeof import("vue-router")["useRouter"];
const useSlots: typeof import("vue")["useSlots"];
const useTemplateRef: typeof import("vue")["useTemplateRef"];
const watch: typeof import("vue")["watch"];
const watchEffect: typeof import("vue")["watchEffect"];
const watchPostEffect: typeof import("vue")["watchPostEffect"];
@@ -66,5 +71,21 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue";
export type {
Component,
ComponentPublicInstance,
ComputedRef,
DirectiveBinding,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
MaybeRef,
MaybeRefOrGetter,
VNode,
WritableComputedRef
} from "vue";
import("vue");
}

22
src/components.d.ts vendored
View File

@@ -7,15 +7,18 @@ export {}
declare module "vue" {
export interface GlobalComponents {
403: typeof import("./components/ErrorMessage/403.vue")["default"];
404: typeof import("./components/ErrorMessage/404.vue")["default"];
500: typeof import("./components/ErrorMessage/500.vue")["default"];
ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"];
DetailsSearch: typeof import("./components/DetailsSearch/index.vue")["default"];
ElAside: typeof import("element-plus/es")["ElAside"];
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
ElButton: typeof import("element-plus/es")["ElButton"];
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
ElContainer: typeof import("element-plus/es")["ElContainer"];
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
ElDialog: typeof import("element-plus/es")["ElDialog"];
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
@@ -41,15 +44,28 @@ declare module "vue" {
ElTabs: typeof import("element-plus/es")["ElTabs"];
ElTag: typeof import("element-plus/es")["ElTag"];
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
Form: typeof import("./components/Form/index.vue")["default"];
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
FormTable: typeof import("./components/FormTable/index.vue")["default"];
Grid: typeof import("./components/Grid/index.vue")["default"];
GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"];
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
IEpRemove: typeof import("~icons/ep/remove")["default"];
IEpSearch: typeof import("~icons/ep/search")["default"];
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
Loading: typeof import("./components/Loading/index.vue")["default"];
Pagination: typeof import("./components/ProTable/components/Pagination.vue")["default"];
PermissionButton: typeof import("./components/PermissionButton/index.vue")["default"];
ProTable: typeof import("./components/ProTable/index.vue")["default"];
RouterLink: typeof import("vue-router")["RouterLink"];
RouterView: typeof import("vue-router")["RouterView"];
SearchForm: typeof import("./components/SearchForm/index.vue")["default"];
SearchFormItem: typeof import("./components/SearchForm/components/SearchFormItem.vue")["default"];
TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"];
}
}

View File

@@ -113,6 +113,7 @@
v-model="_searchResult[`${item.prop}`]"
multiple
filterable
:reserve-keyword="false"
@remove-tag="handleRomoveTag(item)"
:disabled="item.disabled"
:placeholder="item.placeholder"
@@ -129,15 +130,16 @@
<template
v-if="item.type === 'selectMultipleRemoteCustomersNames' || item.type === 'selectProductLinesRemote'"
>
<!-- // filterable -->
<el-select
v-model="_searchResult[`${item.prop}`]"
:placeholder="item.placeholder"
remote
multiple
filterable
multiple
:reserve-keyword="false"
@remove-tag="handleTagRemove1(item)"
class="m-2 select"
remote-show-suffix
@clear="handleSelectClear(item.prop)"
:remote-method="(query:any)=> handleSelectMultipleRemote(query, item)"
:disabled="item.disabled"
>
@@ -169,6 +171,7 @@ const props = defineProps<{
inline?: Boolean;
getSearchValue?: () => void;
selectMultipleRemoveTag?: () => void;
selectMultipleRemoteTag1?: () => void;
setRuleFormValue?: () => void;
}>();
@@ -181,12 +184,18 @@ const emits = defineEmits<{
(e: "setMaterialList", result: Record<string, any>): void;
(e: "setRuleFormValue", result: Record<string, any>): void;
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
(e: "selectMultipleRemoteTag1", result: Record<string, any>): void;
}>();
const handleRomoveTag = (item: any) => {
console.log(_searchResult.value, "=-_searchResult.value=");
emits("selectMultipleRemoveTag", { item, org_number: _searchResult.value.org_number });
};
const handleTagRemove1 = (item: any) => {
if (!_searchResult.value[item.prop].length) {
item.options = [];
}
};
//客戶
const getCustomers = async (keywords: any, item: any) => {
let org_number = _searchResult.value.org_number.join(",");
@@ -197,11 +206,15 @@ const getCustomers = async (keywords: any, item: any) => {
let options: any = [];
data.forEach((item: any) => {
options.push({
value: item.customer_number,
label: item.customer_name
value: item.customer_number + "_" + item.use_org_number,
label: item.customer_name + " " + `(${item.use_org_name})`,
id: item.use_org_number,
useOrgName: item.use_org_name
});
});
item.options = options;
} else {
item.options = [];
}
}
};
@@ -220,6 +233,8 @@ const getProductLines = async (keywords: any, item: any) => {
});
});
item.options = options;
} else {
item.options = [];
}
}
};
@@ -234,10 +249,12 @@ const getUsers = async (keywords: any, item: any) => {
data.forEach((item: any) => {
options.push({
value: item.dduid,
label: item.realname
label: item.realname + " " + item.mobile
});
});
item.options = options;
} else {
item.options = [];
}
}
};
@@ -247,6 +264,7 @@ const handleSelectMultipleRemote = (query: any, item: any) => {
if (!query) {
return;
}
item.options = [];
let valClone = query.replace(/^\s*|\s*$/g, "");
if (!valClone) {
return;
@@ -271,9 +289,7 @@ const remoteMethod = async (query: any, item: any) => {
getUsers(valClone, item);
}
};
const handleSelectClear = (prop: any) => {
console.log("会触发吗?", prop);
};
//input输入验证
const valueVerify = (item: any) => {
//只能输入整数

View File

@@ -16,5 +16,5 @@ const router = useRouter();
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -16,5 +16,5 @@ const router = useRouter();
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -16,5 +16,5 @@ const router = useRouter();
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -119,5 +119,5 @@ const resetForm = (formEl: FormInstance | undefined) => {
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -83,5 +83,5 @@ const resetForm = (formEl: FormInstance | undefined) => {
</script>
<style scoped lang="scss">
// @import "./index.scss";
// @use "./index.scss";
</style>

View File

@@ -99,7 +99,7 @@ import { ElTable, ElTableColumn } from "element-plus";
import { QuestionFilled } from "@element-plus/icons-vue";
const props = defineProps<{
columns: any;
rowStyle?: (params: any) => void;
rowStyle?: any;
isStatus?: boolean;
tableData?: any;
height?: number;

View File

@@ -147,5 +147,5 @@ defineExpose({
});
</script>
<style lang="scss" scoped>
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -9,5 +9,5 @@
<script setup lang="ts" name="Loading"></script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -135,7 +135,7 @@ const props = withDefaults(defineProps<ProTableProps>(), {
toolButton: true,
// rowKey: `id${index}`,
// searchCol: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }),
sizes: [1, 2, 3, 4]
sizes: [50, 100, 150, 200]
});
// 是否显示搜索模块

View File

@@ -3,6 +3,7 @@ import { BreakPoint, Responsive } from "@/components/Grid/interface";
import { TableColumnCtx } from "element-plus/es/components/table/src/table-column/defaults";
import { ProTableProps } from "@/components/ProTable/index.vue";
import ProTable from "@/components/ProTable/index.vue";
import { DefaultRow } from "element-plus/es/components/table/src/table/defaults";
export interface EnumProps {
label?: string; // 选项框显示的文字
@@ -53,20 +54,21 @@ export type FieldNamesProps = {
children?: string;
};
export type RenderScope<T> = {
export type RenderScope<T extends DefaultRow> = {
row: T;
$index: number;
column: TableColumnCtx<T>;
[key: string]: any;
};
export type HeaderRenderScope<T> = {
export type HeaderRenderScope<T extends DefaultRow> = {
$index: number;
column: TableColumnCtx<T>;
[key: string]: any;
};
export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, "children" | "renderCell" | "renderHeader">> {
export interface ColumnProps<T extends DefaultRow = any>
extends Partial<Omit<TableColumnCtx<T>, "children" | "renderCell" | "renderHeader">> {
tag?: boolean; // 是否是标签展示
isShow?: boolean; // 是否显示在表格当中
search?: SearchProps | undefined; // 搜索项配置

View File

@@ -225,5 +225,5 @@ const handleEmitClear = (item: any) => {
};
</script>
<style lang="scss" scope>
@import "../index.scss";
@use "../index.scss";
</style>

View File

@@ -3,8 +3,6 @@
}
.form-item {
width: 344px !important;
// height: 32px;
margin-right: 12px !important;
.form-item-select {
width: 224px !important;
@@ -19,28 +17,7 @@
}
}
}
.btn-box {
display: flex;
flex: 1;
justify-content: flex-end;
}
.copyBtn {
display: flex;
align-items: center;
justify-content: center;
}
.down-box {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
margin-right: 15px;
cursor: pointer;
border: 1px solid #cccccc;
border-radius: 4px;
&:hover {
color: #4178d5 !important;
border: 1px solid rgb(65 120 213 / 50%);
}
}
// ::v-deep(.el-select__input) {
// font-size: 12px !important;
// }

View File

@@ -58,7 +58,7 @@
v-if="item.type === 'selectRemote' || item.type === 'selectRemote1' || item.type === 'selectRemote2'"
>
<el-select
v-model="_searchParams[`${item.prop}`]"
v-model.trim="_searchParams[`${item.prop}`]"
:placeholder="item.placeholder"
clearable
remote
@@ -89,11 +89,13 @@
<!-- getProductLinesApi -->
<template v-if="item.type === 'selectMultipleRemote' || item.type === 'selectProductLinesRemote'">
<el-select
v-model="_searchParams[`${item.prop}`]"
v-model.trim="_searchParams[`${item.prop}`]"
:placeholder="item.placeholder"
remote
multiple
filterable
:reserve-keyword="false"
@remove-tag="handleTagRemove(item)"
@clear="handleClear(item)"
:loading="loading"
class="m-2 select"
@@ -121,13 +123,16 @@
<template v-if="item.type === 'selectMultiple'">
<!-- multiple -->
<el-select
v-model="_searchParams[`${item.prop}`]"
v-model.trim="_searchParams[`${item.prop}`]"
filterable
multiple
:disabled="item.disabled"
:placeholder="item.placeholder"
class="m-2 select"
:reserve-keyword="false"
style="width: 224px"
@remove-tag="handleTagRemove1(item)"
ref="remoteRef"
>
<!-- 循环渲染选项label 为显示文本value 为实际提交值 -->
<el-option
@@ -142,13 +147,14 @@
<template v-if="item.type === 'selectMultipleD'">
<!-- multiple -->
<el-select
v-model="_searchParams[`${item.prop}`]"
v-model.trim="_searchParams[`${item.prop}`]"
filterable
clearable
:reserve-keyword="false"
:disabled="item.disabled"
:placeholder="item.placeholder"
class="m-2 select"
style="width: 224px"
style="width: 224px; font-size: 12px !important"
>
<!-- 循环渲染选项label 为显示文本value 为实际提交值 -->
<el-option
@@ -175,15 +181,17 @@ import { getSupplierApi, getCustomersApi, getProductLinesApi } from "@/api/modul
const props = defineProps<{
formData: any[];
searchParams: Record<string, any>;
selectMultipleRemoveTag?: () => void;
}>();
const emits = defineEmits<{
(e: "search", result: Record<string, any>): void;
(e: "reset", result: Record<string, any>): void;
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
}>();
let loading = ref(false);
const remoteRef = ref(null);
const _searchParams = computed(() => {
return props.searchParams;
});
@@ -206,6 +214,8 @@ const getSupplier = async (keywords: any, item: any) => {
if (result?.code === 0) {
const { data } = result;
item.options = data;
} else {
item.options = [];
}
};
//客戶
@@ -216,13 +226,17 @@ const getCustomers = async (keywords: any, item: any) => {
const { data } = result;
if (Array.isArray(data) && data.length) {
let options: any = [];
data.forEach((item: any) => {
data.forEach((it: any) => {
options.push({
value: item.customer_number,
label: item.customer_name
value: it.customer_number + "_" + it.use_org_number,
label: it.customer_name + " " + `(${it.use_org_name})`,
id: it.use_org_number,
useOrgName: it.use_org_name
});
});
item.options = options;
} else {
item.options = [];
}
}
};
@@ -233,39 +247,53 @@ const getProductLines = async (keywords: any, item: any) => {
const { data } = result;
if (Array.isArray(data) && data.length) {
let options: any = [];
data.forEach((item: any) => {
data.forEach((it: any) => {
options.push({
value: item,
label: item
value: it,
label: it
});
});
item.options = options;
} else {
item.options = [];
}
}
};
//多选远程搜索
const handleSelectMultipleRemote = async (query: any, item: any) => {
console.log(remoteRef.value, "==========remoteRef=========");
loading.value = true;
if (!query) {
loading.value = false;
return;
}
item.options = [];
//去除字符串首尾的所有空白字符。
let valClone = query.replace(/^\s*|\s*$/g, "");
if (!valClone.length) {
loading.value = false;
return;
}
if (item.type === "selectMultipleRemote") {
//客戶編碼
getCustomers(valClone, item);
} else if (item.type === "selectProductLinesRemote") {
//品线
console.log("走到了这里");
getProductLines(valClone, item);
}
loading.value = false;
};
const handleTagRemove = (item: any) => {
if (!_searchParams.value[item.prop].length) {
item.options = [];
}
};
const handleTagRemove1 = (item: any) => {
emits("selectMultipleRemoveTag", { item, org_number: _searchParams.value.org_number });
};
//单选远程搜索(供应商)
const remoteMethod = async (query: any, item: any) => {
loading.value = true;
@@ -273,8 +301,9 @@ const remoteMethod = async (query: any, item: any) => {
loading.value = false;
return;
}
item.options = [];
//去除字符串首尾的所有空白字符。
let valClone = query.replace(/^\s*|\s*$/g, "");
let valClone = query.replace(/^\s+|\s+$/g, "");
if (!valClone.length) {
loading.value = false;
return;
@@ -309,5 +338,8 @@ const handleFormReset = () => {
};
</script>
<style lang="scss" scope>
@import "./index.scss";
@use "./index.scss";
.el-select__selected-item {
font-size: 12px;
}
</style>

21
src/env.d.ts vendored Normal file
View File

@@ -0,0 +1,21 @@
// src/env.d.ts
// import type { ComponentCustomOptions } from "vue";
declare global {
namespace JSX {
interface IntrinsicElements {
// 声明常用的 Element Plus 组件
"el-option": any;
"el-radio": any;
"el-checkbox": any;
"el-button": any;
"el-table-column": any;
"el-table": any;
"el-tag": any;
// 可以继续添加其他需要的组件
}
}
}
// 确保模块被识别
export {};

View File

@@ -1,12 +0,0 @@
/**
* @description 精度处理
* @param data 数据源
* @param type Decimal方法
* @param typeData mul | div| add | sub 方法参数 的数据
* @return returnData {number}
* */
import { Decimal } from "decimal.js";
export const useDecimal = (data: number, type?: "mul" | "div" | "add" | "sub", typeData?: number) => {
let returnData = type && typeData ? new Decimal(data)[type](typeData).toNumber() : new Decimal(data).toNumber();
return returnData;
};

View File

@@ -1,9 +0,0 @@
import { cloneDeep } from "lodash-es";
export const useFilter = (datas: any) => {
const target = cloneDeep(datas);
const returnTarget = target.filter((item: any) => {
return !item.disable;
});
return returnTarget;
};

View File

@@ -30,15 +30,16 @@ export const useTable = (
console.log("分页参数更新:", newVal);
}
});
//订阅列表数据处理
//訂閲数据处理
const initSubscribeData = () => {
if (routeName === "foundationSubscribeList") {
if (Array.isArray(state.totalParam?.org_number) && state.totalParam?.org_number?.length) {
state.totalParam.org_number = state.totalParam.org_number.join(",");
}
//品线
if (Array.isArray(state.totalParam?.product_line_name) && state.totalParam?.product_line_name?.length) {
state.totalParam.org_number = state.totalParam.product_line_name.join(",");
if (Array.isArray(state.totalParam?.product_line) && state.totalParam?.product_line?.length) {
state.totalParam.product_line = state.totalParam.product_line.join(",");
}
//客户名称
if (Array.isArray(state.totalParam?.customer_number) && state.totalParam?.customer_number?.length) {
@@ -53,10 +54,26 @@ export const useTable = (
}
}
}
if (routeName === "foundationSubscribeWarehousing") {
if (Array.isArray(state.totalParam?.org_number) && state.totalParam?.org_number?.length) {
state.totalParam.org_number = state.totalParam.org_number.join(",");
}
if (state.totalParam?.subscriber_name) {
// let names: any = "";
state.totalParam.subscriber_name = state.totalParam?.subscriber_name.replace(/[,]/g, ",");
}
}
};
// //其他數據處理
// const initData = () => {
// if (state.totalParam?.warehouse_number) {
// state.totalParam.warehouse_number = state.totalParam?.warehouse_number.split("_")[0];
// }
// };
//删除临时参数和空值参数
const deleteParams = () => {
const KEY = ["Time", "customer_number1"];
const KEY = ["Time", "customer_number1", "customer_numbers"];
for (let key in state.totalParam) {
if (KEY.includes(key) || !state.totalParam[key]) {
delete state.totalParam[key];
@@ -71,12 +88,14 @@ export const useTable = (
if (!api) return;
try {
initSubscribeData();
deleteParams();
await initSubscribeData();
await deleteParams();
// await initData();
let params = {
...state.totalParam,
...pageParam.value
};
const { data } = await api(params);
state.tableData = data.data || [];
clearSelection && clearSelection();
@@ -126,6 +145,7 @@ export const useTable = (
state.totalParam = {};
// 同步到查询参数
state.searchParam = { ...newVal };
console.log(state.searchParam, "= state.searchParam=");
// 同步到参数快照
state.totalParam = { ...newVal, ...pageParam.value };
},

View File

@@ -55,5 +55,5 @@ const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -96,5 +96,5 @@ const changeSubMenu = (item: Menu.MenuOptions) => {
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -60,5 +60,5 @@ const handleClickMenu = (subItem: Menu.MenuOptions) => {
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -50,7 +50,7 @@ const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
.el-container .el-aside .aside-box .el-scrollbar {
background-color: #161616 !important;
}

View File

@@ -1,7 +1,7 @@
<template>
<div class="tool-bar-ri">
<div class="header-icon">
<SearchMenu id="searchMenu" />
<!-- <SearchMenu id="searchMenu" /> -->
<Fullscreen id="fullscreen" />
</div>
@@ -10,7 +10,7 @@
</template>
<script setup lang="ts">
import SearchMenu from "./components/SearchMenu.vue";
// import SearchMenu from "./components/SearchMenu.vue";
import Fullscreen from "./components/Fullscreen.vue";
import Avatar from "./components/Avatar.vue";
</script>

View File

@@ -2,7 +2,7 @@
<!-- 公司名 -->
<div class="name-box font12" style="padding-top: 2px">
<span style="margin-right: 10px; margin-left: 10px">
{{ userStore.userInfo.corp.corp_name ? userStore.userInfo.corp.corp_name : "" }}
{{ userStore?.userInfo?.corp?.corp_name ? userStore?.userInfo?.corp?.corp_name : "" }}
</span>
</div>
@@ -10,7 +10,7 @@
<div class="name-box font12">
<el-dropdown trigger="click" class="triangle-box">
<div>
{{ userStore.userInfo.nickname }}
{{ userStore?.userInfo?.nickname }}
<el-icon class="triangle">
<i-ep-arrow-down />
</el-icon>
@@ -41,15 +41,12 @@ const logout = () => {
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
//1.退出登录
const result: any = await logoutApi();
if (result?.code === 0) {
userStore.$reset();
//清除本地
localStorage.clear();
location.href = usePathUrl();
setTimeout(() => {
userStore.$reset();
//清除本地
localStorage.clear();
}, 300);
}
});
};

View File

@@ -71,5 +71,5 @@ watch(
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -100,5 +100,5 @@ const closeAllTab = () => {
</script>
<style scoped lang="scss">
@import "../index.scss";
@use "../index.scss";
</style>

View File

@@ -127,5 +127,5 @@ const tabRemove = (fullPath: TabPaneName) => {
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -30,7 +30,7 @@
:href="scope.row.download_url"
v-if="
scope.row.status == 1 &&
Math.abs((new Date(scope.row.date).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
Math.abs((new Date(scope.row.created_at).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
"
>下载</a
>

View File

@@ -2,7 +2,7 @@ export const BUTTON = [
{
text: "导出",
permission: "foundationSetMaterialBtnExport",
type: "add",
type: "export",
props: {
type: "primary"
}
@@ -10,6 +10,6 @@ export const BUTTON = [
{
text: "刷新",
permission: "foundationSetMaterialBtnRefresh",
type: "del"
type: "reset"
}
];

View File

@@ -34,6 +34,22 @@ export const FORM_DATA: FormItem[] = [
placeholder: "请输入品线",
type: "input",
label: "品线: "
},
{
prop: "disabled",
placeholder: "请选择",
type: "select",
label: "物料状态: ",
options: [
{
value: 1,
label: "禁用"
},
{
value: "启用",
label: "启用"
}
]
}
];

View File

@@ -1,61 +1,93 @@
import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{ type: "selection", fixed: "left", width: 40 },
{
align: "left",
fixed: true,
label: "物料编码",
prop: "material_number"
prop: "material_number",
width: 200
},
{
align: "left",
label: "规格型号(SKU)",
prop: "sku"
prop: "sku",
fixed: true,
width: 200
},
{
align: "left",
label: "物料名称",
prop: "material_name"
prop: "material_name",
width: 200
},
{
align: "left",
label: "组织",
prop: "org_name"
prop: "org_name",
width: 200
},
{
align: "left",
label: "品线",
prop: "product_line"
prop: "product_line",
width: 200
},
{
align: "left",
label: "69码",
prop: "bar_code"
prop: "bar_code",
width: 200
},
{
align: "left",
label: "FNSKU",
prop: "fnsku"
prop: "fnsku",
width: 200
},
{
align: "left",
label: "1级分类",
prop: "category_lv1"
prop: "category_lv1",
width: 200
},
{
align: "left",
label: "2级分类",
prop: "category_lv2"
prop: "category_lv2",
width: 200
},
{
align: "left",
label: "3级分类",
prop: "category_lv3"
prop: "category_lv3",
width: 200
},
{
align: "left",
label: "SPU",
prop: "spu"
prop: "spu",
width: 200
},
{
align: "left",
label: "物料状态",
prop: "disabled",
width: 200,
render: (scope: RenderScope<any>): VNode | string | any => {
const OBJ: any = {
0: "启用",
1: "禁用"
};
return OBJ[scope.row.disabled];
}
},
{
align: "left",
label: "更新时间",
prop: "updated_at",
width: 200
}
];

View File

@@ -66,7 +66,12 @@ const selectionChange = (selection: any) => {
};
const handleButtonClickCallback = (item: any) => {
const { type } = item;
btnClick[type](item, dataStore.selectionList, proTableRef);
btnClick[type]({
selectionList: dataStore.selectionList,
proTableRef,
initParam: dataStore.initParam
});
};
//搜索

View File

@@ -1,44 +1,35 @@
import { getMaterialListReloadApi, getMaterialListExportApi } from "@/api/modules/foundationMaterial";
import { useMsg } from "@/hooks/useMsg";
// 直接导出函数,无需额外包装对象
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
console.log("导出操作", item);
console.log(selectionList, "=selectionList=");
let length = selectionList.length;
if (!length) {
useMsg("warning", "请选择需要删除的数据");
return;
// 导出
export const handleExport = async (params: any) => {
const { initParam } = params;
const result = await getMaterialListExportApi(initParam);
if (result?.code === 0) {
useMsg("success", "导出成功 ");
}
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(async () => {
proTable.value!.getTableList();
// const result = await commitListApi();
// if (result.status === 200) {
// useMsg("success", "删除成功 ");
// } else {
// useMsg("error", result.message);
// }
})
.catch(() => {});
};
// proTable: any
export const handleAdd = (item: any, selectionList: any[]) => {
console.log("刷新操作", item);
//刷新
export const handleReload = async (params: any) => {
const { selectionList, proTable } = params;
let length = selectionList.length;
let ids: any = [];
if (length && length > 100) {
useMsg("warning", "选中刷新数据最大100条");
useMsg("warning", "选中刷新数据最大100条 ");
return;
}
selectionList.forEach((item: any) => {
ids.push(item.id);
});
let id = ids.join(",");
const result = await getMaterialListReloadApi({ id });
if (result?.code === 0) {
useMsg("success", "数据刷新成功 ");
proTable?.value!.getTableList();
}
};
export const btnClick: any = {
del: handleDel,
add: handleAdd
export: handleExport,
reset: handleReload
};

View File

@@ -42,7 +42,15 @@ const dataStore = reactive({
});
const userStore = useUserStore();
const $route = useRoute();
dataStore.formData[0].options = userStore.orgIdArr;
const init = () => {
//$route.query.title === "新增订阅" ? org_number: ["101"],
if ($route.query.title === "新增订阅") {
dataStore.ruleForm.org_number = ["101"];
}
};
init();
//新增
const handleAdd = () => {
if (
@@ -121,19 +129,36 @@ const getSubscribeDetails = async () => {
setDetailsData(dataStore, data);
}
};
const filterBySecondArray = (firstArray: any, secondArray: any) => {
if (!firstArray || !secondArray) {
return;
}
if (!firstArray.length || !secondArray.length) {
return;
}
// 创建一个Set用于快速查找
const filterSet = new Set(secondArray);
// 过滤出后缀在第二个数组中的元素(保留符合条件的)
return firstArray.filter((item: any) => {
// 分割字符串获取后缀部分
const suffix = item.split("_")[1];
// 检查后缀是否在过滤集合中,保留存在的元素
return filterSet.has(suffix);
});
};
//本地多选远程搜索Tag删除回调(组织)
const handleSelectMultipleRemoveTag = async (params: any) => {
const { org_number } = params;
let customers: any = [];
// 筛选出 org_number 在 ids 中的数据
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => org_number.includes(item.org_number));
dataStore.formData[1].options.length &&
dataStore.formData[1].options.forEach((item: any) => {
customers.push(item.value);
});
// 筛选出 org_number 数组包含的数据
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => {
return org_number.includes(item.id);
});
dataStore.ruleForm.customer_number = customers;
dataStore.ruleForm.customer_number1 = filterBySecondArray(dataStore.ruleForm.customer_number1, org_number);
};
getSubscribeDetails();
@@ -146,4 +171,25 @@ const handleButtonClickCallback = (item: any) => {
handleCommit();
}
};
const getPrefixes = (arr: any) => {
// 遍历数组,返回每个元素下划线前面的部分
return arr.map((item: any) => {
// 分割字符串并返回下划线前面的部分索引0
return item.split("_")[0];
});
};
watch(
() => dataStore.ruleForm.customer_number1,
(newVal: any) => {
if (Array.isArray(newVal) && newVal.length) {
dataStore.ruleForm.customer_number = getPrefixes(newVal);
} else {
dataStore.ruleForm.customer_number = [];
}
},
{
deep: true
}
);
</script>

View File

@@ -1,17 +1,18 @@
export const FORM_DATA: any[] = [
{
prop: "org_number",
placeholder: "",
placeholder: "请输入",
type: "selectMultiple",
label: "组织:",
disabled: false,
required: true,
class: "form-item1",
options: []
},
{
prop: "customer_number",
placeholder: "",
prop: "customer_number1",
placeholder: "请输入",
type: "selectMultipleRemoteCustomersNames",
label: "客户名称:",
disabled: false,
@@ -21,7 +22,7 @@ export const FORM_DATA: any[] = [
},
{
prop: "customer_number",
placeholder: "",
placeholder: "请输入",
type: "input",
label: "客户编码:",
disabled: true,
@@ -30,7 +31,7 @@ export const FORM_DATA: any[] = [
},
{
prop: "product_lines",
placeholder: "",
placeholder: "请输入",
type: "selectProductLinesRemote",
label: "品线:",
disabled: false,
@@ -40,7 +41,7 @@ export const FORM_DATA: any[] = [
},
{
prop: "subscriber_dduid",
placeholder: "",
placeholder: "请输入",
type: "selectRemoteUser",
label: "订阅账号:",
disabled: false,

View File

@@ -24,7 +24,7 @@ export const FORM_DATA: FormItem[] = [
options: []
},
{
prop: "customer_number",
prop: "customer_numbers",
placeholder: "请输入客户名称",
type: "selectMultipleRemote",
label: "客户名称: ",
@@ -37,7 +37,7 @@ export const FORM_DATA: FormItem[] = [
label: "客户编码: "
},
{
prop: "product_line_name",
prop: "product_line",
placeholder: "请输入品线",
type: "selectProductLinesRemote",
label: "品线: ",
@@ -71,5 +71,6 @@ export const FORM_DATA: FormItem[] = [
export const RULE_FORM = {
page: 1,
size: 1,
org_number: ["101"]
org_number: ["101"],
customer_number: []
};

View File

@@ -3,19 +3,20 @@ export const COLUMNS = [
{
align: "left",
label: "订阅账号",
prop: "subscriber_name"
},
{
align: "left",
fixed: true,
label: "客户名称",
prop: "customer_name"
prop: "subscriber_name",
fixed: true
},
{
align: "left",
label: "组织",
prop: "org_name"
},
{
align: "left",
label: "客户名称",
prop: "customer_name"
},
{
align: "left",
label: "客户编码",

View File

@@ -19,6 +19,7 @@
<SearchForm
@search="handleSearch"
@reset="handleReset"
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
:searchParams="dataStore.initParam"
:formData="dataStore.formData"
/>
@@ -57,7 +58,7 @@ const userStore = useUserStore();
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
formData: FORM_DATA, //搜索配置项
buttons: cloneDeep(BUTTON),
options: [], //规格型号
@@ -109,6 +110,58 @@ const handleOpen = (row: any) => {
query: { id: row.id, title: "编辑订阅" }
});
};
const filterBySecondArray = (firstArray: any, secondArray: any) => {
if (!firstArray || !secondArray) {
return;
}
if (!firstArray.length || !secondArray.length) {
return;
}
// 创建一个Set用于快速查找
const filterSet = new Set(secondArray);
// 过滤出后缀在第二个数组中的元素(保留符合条件的)
return firstArray.filter((item: any) => {
// 分割字符串获取后缀部分
const suffix = item.split("_")[1];
// 检查后缀是否在过滤集合中,保留存在的元素
return filterSet.has(suffix);
});
};
const getPrefixes = (arr: any) => {
// 遍历数组,返回每个元素下划线前面的部分
return arr.map((item: any) => {
// 分割字符串并返回下划线前面的部分索引0
return item.split("_")[0];
});
};
//本地多选远程搜索Tag删除回调(组织)
const handleSelectMultipleRemoveTag = async (params: any) => {
const { org_number } = params;
// 筛选出 org_number 数组包含的数据
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => {
return org_number.includes(item.id);
});
let customer_numbers = filterBySecondArray(dataStore.initParam.customer_numbers, org_number);
dataStore.initParam.customer_numbers = customer_numbers;
};
watch(
() => dataStore.initParam.customer_numbers,
(newVal: any) => {
if (Array.isArray(newVal) && newVal.length) {
dataStore.initParam.customer_number = getPrefixes(newVal);
} else {
dataStore.initParam.customer_number = [];
}
},
{
deep: true
}
);
</script>
<style scope lang="scss">

View File

@@ -10,15 +10,19 @@ export const setDetailsData = (dataStore: any, data: any) => {
if (data?.customers?.length) {
data?.customers?.forEach((item: any) => {
//客户编码
dataStore.ruleForm.customers.push(item.customer_number);
dataStore.ruleForm.customers.push(item.customer_number + "_" + item.use_org_number);
//客户名称下拉框数据初始化
customers_names.push({
value: item.customer_number,
label: item.customer_name,
org_number: "100"
value: item.customer_number + "_" + item.use_org_number,
label: item.customer_name + " " + `(${item.use_org_name})`,
id: item.use_org_number,
useOrgName: item.use_org_name
});
});
console.log(customers_names, "=customers_names=");
console.log(dataStore.ruleForm.customers, "=dataStore.ruleForm.customers=");
//客户名称值回填
dataStore.ruleForm.customer_number1 = dataStore.ruleForm.customers;
dataStore.ruleForm.customer_number = dataStore.ruleForm.customers;
//客户名称下拉框数据
dataStore.formData[1].options = customers_names;
@@ -43,7 +47,7 @@ export const setDetailsData = (dataStore: any, data: any) => {
dataStore.formData[4].options = [
{
value: data?.subscriber_dduid,
label: data?.subscriber_name
label: data?.subscriber_mobile ? data?.subscriber_name + " " + data?.subscriber_mobile : data?.subscriber_name
}
];
dataStore.ruleForm.subscriber_dduid = data?.subscriber_dduid;

View File

@@ -2,7 +2,7 @@ export const BUTTON = [
{
text: "导出",
permission: "foundationSubscribeWarehousingBtnExport",
type: "add",
type: "export",
props: {
type: "primary"
}
@@ -10,6 +10,6 @@ export const BUTTON = [
{
text: "刷新",
permission: "foundationSubscribeWarehousingBtnRefresh",
type: "del"
type: "reset"
}
];

View File

@@ -17,33 +17,46 @@ interface FormItem {
}
export const FORM_DATA: FormItem[] = [
{
prop: "securityNumbers",
prop: "bill_no",
placeholder: "请输入单据编号",
type: "input",
label: "单据编号: "
},
{
prop: "securityNumbers",
prop: "src_bill_no",
placeholder: "请输入来源单号",
type: "input",
label: "来源单号: "
},
{
prop: "securityNumbers",
prop: "order_no",
placeholder: "请输入订单单号",
type: "input",
label: "订单单号: "
},
{
prop: "securityNumbers",
prop: "notif_ret_status",
placeholder: "请选择推送结果",
type: "select",
label: "推送结果: ",
options: []
options: [
{
value: 1,
label: "成功"
},
{
value: "空",
label: "空"
},
{
value: -1,
label: "失败"
}
]
},
{
prop: "securityNumbers",
prop: "material",
placeholder: "请输入物料名称/编码/规格型号",
type: "input",
label: "物料编码: "
@@ -56,14 +69,14 @@ export const FORM_DATA: FormItem[] = [
options: []
},
{
prop: "securityNumbers",
placeholder: "请选择仓库",
type: "select",
label: "仓库: ",
options: []
prop: "warehouse_name",
placeholder: "请输入仓库",
type: "input",
label: "仓库: "
// options: []
},
{
prop: "securityNumbers",
prop: "sub_warehouse_name",
placeholder: "请输入子仓库",
type: "input",
label: "子仓库: "
@@ -75,12 +88,12 @@ export const FORM_DATA: FormItem[] = [
options: [],
startPlaceholder: "入库开始日期",
endPlaceholder: "入库结束日期",
startDate: "createBeginDate",
endDate: "createEndDate",
startDate: "storage_time",
// endDate: "createEndDate",
label: "入库日期: "
},
{
prop: "lotNumbers",
prop: "subscriber_name",
placeholder: "请输入订阅人",
type: "input",
label: "订阅人: "
@@ -90,5 +103,6 @@ export const FORM_DATA: FormItem[] = [
export const RULE_FORM = {
page: 1,
size: 50,
org_number: ["101"]
org_number: ["101"],
subscriber_name: ""
};

View File

@@ -4,92 +4,110 @@ export const COLUMNS = [
align: "left",
fixed: true,
label: "单据编码",
prop: "securityNumber"
prop: "bill_no",
width: 140
},
{
align: "left",
label: "来源单号",
prop: "id"
prop: "src_bill_no",
width: 140
},
{
align: "left",
label: "订单单号",
prop: "specifications"
prop: "order_no",
width: 140
},
{
align: "left",
label: "客户名称",
prop: "createTime"
prop: "customer_name",
width: 140
},
{
align: "left",
label: "入库组织",
prop: "downLoadNumber"
prop: "warehousing_org_name",
width: 200
},
{
align: "left",
label: "单据类型",
prop: "downLoadTime"
prop: "bill_type_name",
width: 140
},
{
align: "left",
label: "规格型号",
prop: "downLoadTime"
prop: "specification",
width: 140
},
{
align: "left",
label: "物料编码",
prop: "downLoadTime"
prop: "material_number",
width: 140
},
{
align: "left",
label: "物料名称",
prop: "downLoadTime"
prop: "material_name",
width: 140
},
{
align: "left",
label: "出厂价",
prop: "downLoadTime"
prop: "factory_price",
width: 140
},
{
align: "left",
label: "入库仓库",
prop: "downLoadTime"
prop: "warehouse_name",
width: 140
},
{
align: "left",
label: "入库子仓库",
prop: "downLoadTime"
prop: "sub_warehouse_name",
width: 140
},
{
align: "left",
label: "入库数量",
prop: "downLoadTime"
prop: "real_qty",
width: 140
},
{
align: "left",
label: "订单明细备注",
prop: "downLoadTime"
prop: "remark",
width: 200
},
{
align: "left",
label: "单位",
prop: "downLoadTime"
prop: "unit_name",
width: 120
},
{
align: "left",
label: "入库时间",
prop: "downLoadTime"
prop: "storage_time",
width: 160
},
{
align: "left",
label: "创建时间",
prop: "downLoadTime"
prop: "created_at",
width: 160
},
{
align: "left",
label: "推送结果",
prop: "downLoadTime"
prop: "notif_ret_text",
width: 120
}
];

View File

@@ -1,4 +1,4 @@
<!-- 质检 -->
<!-- 入库 -->
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
@@ -11,7 +11,7 @@
<ProTable
ref="proTable"
:columns="dataStore.columns"
:request-api="getMaterialListApi"
:request-api="getSubscribeWrrListApi"
:init-param="dataStore.initParam"
@selectionChange="selectionChange"
>
@@ -23,6 +23,23 @@
:formData="dataStore.formData"
/>
</template>
<template #notif_ret_text="scope">
<div
v-if="scope.row.notif_ret_text === '成功'"
style="color: #4178d5; cursor: pointer"
@click="handleClickSuccess(scope.row)"
>
{{ scope.row.notif_ret_text }}
</div>
<div
v-else-if="scope.row.notif_ret_text === '失败'"
style="color: red; cursor: pointer"
@click="handleClickError(scope.row)"
>
{{ scope.row.notif_ret_text }}
</div>
<div v-else-if="!scope.row.notif_ret_text">--</div>
</template>
</ProTable>
</div>
</template>
@@ -32,7 +49,7 @@ import ProTable from "@/components/ProTable/index.vue";
// import { useMsg } from "@/hooks/useMsg";
import PermissionButton from "@/components/PermissionButton/index.vue";
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
import { getSubscribeWrrListApi } from "@/api/modules/warehousing";
import SearchForm from "@/components/SearchForm/index.vue";
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
//表格TS
@@ -57,18 +74,64 @@ const dataStore = reactive<any>({
selectionList: [], //选中表格的行
loading: false
});
//设置组织数组
dataStore.formData[5].options = userStore.orgIdArr;
const init = () => {
//设置组织数组
dataStore.formData[5].options = userStore.orgIdArr;
//设置仓库数据
dataStore.formData[6].options = userStore.warehouse;
//订阅人
dataStore.initParam.subscriber_name = userStore.userInfo.nickname;
};
init();
// 表格选择事件
const selectionChange = (selection: any) => {
dataStore.selectionList = selection;
};
const handleButtonClickCallback = (item: any) => {
const { type } = item;
btnClick[type](item, dataStore.selectionList, proTable);
btnClick[type]({
selectionList: dataStore.selectionList,
proTable,
initParam: dataStore.initParam
});
};
//搜索
const handleSearch = async (params: any) => {
dataStore.initParam = cloneDeep(params);
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTable.value!.getTableList();
});
};
//重置
const handleReset = () => {
dataStore.initParam = cloneDeep(RULE_FORM);
init();
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTable.value!.getTableList();
});
};
const handleClickSuccess = (row: any) => {
Array.isArray;
ElMessageBox.alert(
`<div style='font-size:16px'>${
Array.isArray(row?.notif_user_names) && row?.notif_user_names.length ? row?.notif_user_names.join(",") : ""
}</div>`,
"接收人",
{
dangerouslyUseHTMLString: true,
showConfirmButton: false
}
);
};
const handleClickError = (row: any) => {
ElMessageBox.alert(`<div style='font-size:16px'>${row.fail_msg}</div>`, "失败原因", {
dangerouslyUseHTMLString: true,
showConfirmButton: false
});
};
const handleSearch = () => {};
const handleReset = () => {};
</script>
<style scope lang="scss">

View File

@@ -1,40 +1,35 @@
import { useMsg } from "@/hooks/useMsg";
// 直接导出函数,无需额外包装对象
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
console.log("导出操作", item);
console.log(selectionList, "=selectionList=");
let length = selectionList.length;
if (!length) {
useMsg("warning", "请选择需要删除的数据");
return;
import { getSubscribeResetListApi, getSubscribeResetListExportApi } from "@/api/modules/warehousing";
// 导出
export const handleExport = async (params: any) => {
const { initParam } = params;
const result = await getSubscribeResetListExportApi(initParam);
if (result?.code === 0) {
useMsg("success", "导出成功 ");
}
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(async () => {
proTable.value!.getTableList();
// const result = await commitListApi();
// if (result.status === 200) {
// useMsg("success", "删除成功 ");
// } else {
// useMsg("error", result.message);
// }
})
.catch(() => {});
};
// proTable: any
export const handleAdd = (item: any, selectionList: any[]) => {
export const handleReSet = async (item: any, selectionList: any[], proTable: any) => {
console.log("刷新操作", item);
let length = selectionList.length;
if (length && length > 100) {
useMsg("warning", "选中刷新数据最大100条");
return;
}
let ids: any = [];
selectionList.forEach((item: any) => {
ids.push(item.id);
});
let id = ids.join(",");
const result = await getSubscribeResetListApi({ id });
if (result?.code === 0) {
useMsg("success", "数据刷新成功 ");
proTable.value!.getTableList();
}
};
export const btnClick: any = {
del: handleDel,
add: handleAdd
export: handleExport,
reset: handleReSet
};

View File

@@ -6,10 +6,10 @@
<script setup lang="ts" name="home">
//登录请求接口
import { getOrgsApi } from "@/api/modules/global";
import { getOrgsApi, getWarehousesListApi } from "@/api/modules/global";
//用户信息存储
import { useUserStore } from "@/stores/modules/user";
//setOrgIdArr
const userStore = useUserStore();
//获取组织
const getOrgs = async () => {
@@ -30,18 +30,26 @@ const getOrgs = async () => {
}
};
getOrgs();
// //获取供应商
// const getSupplier = async () => {
// const result = await getSupplierApi();
// if (result?.code === 0) {
// const { data } = result;
// console.log(data, "=============>");
// }
// };
// getSupplier();
const getWarehousesList = async () => {
const result = await getWarehousesListApi();
if (result?.code === 0) {
const { data } = result;
if (data?.length) {
let options: any = [];
data.forEach((item: any) => {
options.push({
id: item.id,
value: item.warehouse_name,
label: item.warehouse_name
});
});
userStore.setWarehouse(options);
}
}
};
getWarehousesList();
</script>
<style scoped lang="scss">
@import "./index.scss";
@use "./index.scss";
</style>

View File

@@ -5,37 +5,31 @@
//useRouter
import { useRoute, useRouter } from "vue-router";
// import { useMsg } from "@/hooks/useMsg";
//重定向
import { usePathUrl } from "@/hooks/usePathUrl";
//登录请求接口
import { loginApi } from "@/api/modules/login";
//用户信息存储
import { useUserStore } from "@/stores/modules/user";
//重定向
import { usePathUrl } from "@/hooks/usePathUrl";
const userStore = useUserStore();
// 路由
//路由;
const $route = useRoute();
const $router = useRouter();
// 设置用户数据
const setUserData = (data: any) => {
// 设置token
userStore.setToken(data.access_token);
// 设置用户信息
userStore.setUserInfo(data.user_data);
//设置好了token和用户信息跳转到首页
setTimeout(() => {
$router.push({ path: "/" });
}, 500);
};
// 登录
const loginHttp = async (code: any) => {
const result: Record<string, any> = await loginApi(code);
if (result.code === 0) {
setUserData(result.data);
userStore.setToken(result?.data?.access_token);
console.log(result?.data?.access_token, "=data.access_token=");
// 设置用户信息
userStore.setUserInfo(result?.data?.user_data);
//设置好了token和用户信息跳转到首页
setTimeout(() => {
$router.push({ path: "/" });
}, 500);
} else {
location.href = usePathUrl();
}