From f7ac35468cd9048a93b89a7c39dacac4f5d1748c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 19 一月 2026 17:11:35 +0800
Subject: [PATCH] 湟水峡 1.下拉框加筛选 2.销售模块不要客户合同号、项目名称 3.客户档案、供应商档案不要和银行有关的字段 4.只需要填客户类型、不需要选择具体的客户针对客户类型产生三种不同的报价、需要绑定产品(比如零售商30、经销商25) 5.客户档案添加客户类型字段
---
src/views/login.vue | 31 ++++++++++++-------------------
1 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index cc98f6b..ffa5b08 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -10,7 +10,7 @@
size="large"
auto-complete="off"
placeholder="璐﹀彿"
- @input="deptListSearch"
+ @input="getUserLoginFacotryList"
>
<template #prefix><el-icon><User /></el-icon></template>
</el-input>
@@ -29,7 +29,7 @@
</el-input>
</el-form-item>
<el-form-item prop="currentFatoryId">
- <el-select v-model="loginForm.currentFatoryId" placeholder="璇烽�夋嫨鍏徃" >
+ <el-select v-model="loginForm.currentFatoryId" placeholder="璇烽�夋嫨鍏徃" filterable>
<el-option v-for="item in factoryList" :key="item.deptId" :label="item.deptName" :value="item.deptId" />
</el-select>
</el-form-item>
@@ -77,7 +77,7 @@
import Cookies from "js-cookie"
import { encrypt, decrypt } from "@/utils/jsencrypt"
import useUserStore from '@/store/modules/user'
-import {userDeptList} from "@/api/system/user.js"
+import {userLoginFacotryList} from "@/api/system/user.js"
const title = import.meta.env.VITE_APP_TITLE
const userStore = useUserStore()
@@ -86,8 +86,8 @@
const { proxy } = getCurrentInstance()
const loginForm = ref({
- username: "admin",
- password: "admin123",
+ username: "",
+ password: "",
rememberMe: false,
currentFatoryId:'',
})
@@ -118,16 +118,9 @@
if (valid) {
loading.value = true
// 鍕鹃�変簡闇�瑕佽浣忓瘑鐮佽缃湪 cookie 涓缃浣忕敤鎴峰悕鍜屽瘑鐮�
- if (loginForm.value.rememberMe) {
- Cookies.set("username", loginForm.value.username, { expires: 30 })
- Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 })
- Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 })
- } else {
- // 鍚﹀垯绉婚櫎
- Cookies.remove("username")
- Cookies.remove("password")
- Cookies.remove("rememberMe")
- }
+ Cookies.set("username", loginForm.value.username, { expires: 30 })
+ Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 })
+ Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 })
userStore.loginCheckFactory(loginForm.value).then(res => {
const query = route.query
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
@@ -169,21 +162,20 @@
}
}
-function deptListSearch() {
+function getUserLoginFacotryList() {
if(loginForm.value.username){
- userDeptList({userName:loginForm.value.username}).then(res => {
+ userLoginFacotryList({userName:loginForm.value.username}).then(res => {
console.log('res', res)
factoryList.value = res.data
})
}else {
factoryList.value = []
}
-
}
getCode()
getCookie()
-deptListSearch()
+getUserLoginFacotryList()
</script>
<style lang='scss' scoped>
@@ -212,6 +204,7 @@
height: 500px;
padding: 40px;
z-index: 1;
+ box-shadow: 0 0 5px 1px #ccc;
.el-input {
height: 40px;
input {
--
Gitblit v1.9.3