diff --git a/.env.prod b/.env.prod
index be6b9a31d..06f2aa7cc 100644
--- a/.env.prod
+++ b/.env.prod
@@ -48,3 +48,7 @@ VITE_SYSTERM_UPDATE_URL = 'https://scptest.faway-hella.com/'
# 是否需要验证码
VITE_NEED_CODE = true
+
+
+# 是否需要下载PDA链接
+VITE_PDA_URL = false
diff --git a/.env.test b/.env.test
index c58a58c21..cb687a764 100644
--- a/.env.test
+++ b/.env.test
@@ -44,3 +44,7 @@ VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = true
+
+
+# 是否需要下载PDA链接
+VITE_PDA_URL = true
\ No newline at end of file
diff --git a/.env.test-scp b/.env.test-scp
index 8bb0eb982..218728c32 100644
--- a/.env.test-scp
+++ b/.env.test-scp
@@ -45,3 +45,6 @@ VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = false
+
+# 是否需要下载PDA链接
+VITE_PDA_URL = false
diff --git a/public/systemConfig.js b/public/systemConfig.js
index cd2f48d94..394209322 100644
--- a/public/systemConfig.js
+++ b/public/systemConfig.js
@@ -13,5 +13,8 @@ let systemConfig = {
tenant: '["成都"]',
systermUpdateAlert: true,
systermUpdateUrl: 'https://scptest.faway-hella.com/',
- needCode:false
+ //是否需要验证码
+ needCode:false,
+ //是否需要PDA下载链接
+ pdaUrl:false,
}
diff --git a/src/api/wms/rawMaterialConsumptionInfo/index.ts b/src/api/wms/rawMaterialConsumptionInfo/index.ts
index 477158e1f..6acc4feef 100644
--- a/src/api/wms/rawMaterialConsumptionInfo/index.ts
+++ b/src/api/wms/rawMaterialConsumptionInfo/index.ts
@@ -54,4 +54,8 @@ export const exportAssemblyMaterialUsage = async (params) => {
}
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/backflush-record-detailb/get-import-template-error' })
+}
diff --git a/src/utils/systemParam.ts b/src/utils/systemParam.ts
index 3341cd539..9cb51bf51 100644
--- a/src/utils/systemParam.ts
+++ b/src/utils/systemParam.ts
@@ -7,6 +7,7 @@ const tenant = ref(import.meta.env.VITE_TENANT)
const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT)
const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL)
const needCode = ref(import.meta.env.VITE_NEED_CODE)
+const pdaUrl = ref(import.meta.env.VITE_PDA_URL)
const mode = ref(import.meta.env.MODE)
// 获取baseUrl
@@ -85,4 +86,13 @@ export const getNeedCode = () => {
}
}
+//是否需要PDA下载链接
+export const getPDAUrl = () => {
+ if(mode.value === 'prod') {
+ return systemConfig.pdaUrl
+ } else {
+ return pdaUrl.value
+ }
+}
+
diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue
index a6f47e85c..1cfff0c24 100644
--- a/src/views/login/components/LoginForm.vue
+++ b/src/views/login/components/LoginForm.vue
@@ -34,6 +34,11 @@
+
+
+
+
+
@@ -69,14 +74,8 @@
+
-
@@ -99,6 +98,8 @@
import { getTenant } from '@/utils/systemParam'
import { getSystermUpdateAlert,getSystermUpdateUrl,getNeedCode } from '@/utils/systemParam'
import {validateResetTime} from "@/api/system/password";
+ import { Verify } from '@/components/Verifition'
+
const needCode = ref(getNeedCode()==true||getNeedCode()=='true')
defineOptions({ name: 'LoginForm' })
@@ -115,8 +116,7 @@
const permissionStore = usePermissionStore()
const redirect = ref('')
const loginLoading = ref(false)
- const verify = ref()
- const captchaType = ref('blockPuzzle') // blockPuzzle 滑块 clickWord 点击文字
+ const VerifySlide = ref()
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN)
@@ -184,16 +184,18 @@
}
}
function getCode() {
+ console.log('getCode')
if(!needCode.value){
return
}
- getCodeImg().then(res => {
- captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
- if (captchaEnabled.value) {
- codeUrl.value = "data:image/gif;base64," + res.img;
- loginData.loginForm.uuid = res.uuid;
- }
- });
+ VerifySlide.value.refresh()
+ // getCodeImg().then(res => {
+ // captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+ // if (captchaEnabled.value) {
+ // codeUrl.value = "data:image/gif;base64," + res.img;
+ // loginData.loginForm.uuid = res.uuid;
+ // }
+ // });
}
//获取租户ID
const getTenantId = async () => {
@@ -221,10 +223,23 @@
name: 'ForgetPassword',
})
};
+ // 滑块校验成功
+ const capctchaCheckSuccess = async ({captchaVerification})=>{
+ console.log('capctchaCheckSuccess',captchaVerification)
+ if(captchaVerification){
+ loginData.loginForm.code = captchaVerification
+ await handleLogin()
+ }
+ }
+ // 滑块校验失败
+ const capctchaCheckError = ()=>{
+ VerifySlide.value.refresh()
+ }
+
const loading = ref() // ElLoading.service 返回的实例
// 登录
- const handleLogin = async (params) => {
+ const handleLogin = async () => {
console.log('登录-185')
if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
await ElMessageBox.alert(
@@ -237,8 +252,10 @@
)
}
loginLoading.value = true
+
try {
await getTenantId()
+
const data = await validForm()
if (!data) {
return
@@ -249,6 +266,8 @@
}else{
res = await LoginApi.login(loginData.loginForm)
}
+
+ console.log('登陆res',res)
try{
await PassWordApi.validateResetTime(res.userId)
}catch (e) {
@@ -293,9 +312,9 @@
wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList())
}finally {
console.log('登录-224')
- getCode()
loginLoading.value = false
loading?.value?.close()
+ getCode()
}
}
// 社交登录
diff --git a/src/views/login/components/QRCodePDA.vue b/src/views/login/components/QRCodePDA.vue
index 2b28194b0..d8d3b05fc 100644
--- a/src/views/login/components/QRCodePDA.vue
+++ b/src/views/login/components/QRCodePDA.vue
@@ -5,14 +5,18 @@
- PDA安装程序下载链接
+ PDA安装程序下载链接