Browse Source

2025.1.7 询价申请新加状态

java8
yuejiayang 1 year ago
parent
commit
9919fcdbfe
  1. 18
      src/router/index.js
  2. 17
      src/views/common/login.vue
  3. 14
      src/views/modules/auth/authInquiry.vue
  4. 14
      src/views/modules/auth/authQuote.vue
  5. 18
      src/views/modules/inquiry/inquiryApplication.vue

18
src/router/index.js

@ -61,15 +61,6 @@ const router = new Router({
router.beforeEach((to, from, next) => {console.log(Vue.prototype.$store) router.beforeEach((to, from, next) => {console.log(Vue.prototype.$store)
// const token = localStorage.getItem('token');
// const isLogin = to.name === 'login'; // 判断是否是登录页
//
// // 保存原始路径(仅在未登录状态下保存)
// if (!token && !isLogin) {
// console.log('保存重定向路径:', to.fullPath);
// localStorage.setItem('redirectPath', to.fullPath);
// }
// 添加动态(菜单)路由 // 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问 // 1. 已经添加 or 全局路由, 直接访问
// 2. 获取菜单列表, 添加并保存本地存储 // 2. 获取菜单列表, 添加并保存本地存储
@ -102,6 +93,15 @@ router.beforeEach((to, from, next) => {console.log(Vue.prototype.$store)
router.push({ name: 'login' }) router.push({ name: 'login' })
}) })
} }
const token = localStorage.getItem('token');
const isLogin = to.name === 'login'; // 判断是否是登录页
// 保存原始路径(仅在未登录状态下保存)
if (!token && !isLogin) {
console.log('保存重定向路径:', to.fullPath);
localStorage.setItem('redirectPath', to.fullPath);
}
}) })
/** /**

17
src/views/common/login.vue

@ -105,13 +105,20 @@ import { getUUID } from '@/utils'
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
// console.log(':', localStorage.getItem('redirectPath')); //
console.log('跳转前路径:', localStorage.getItem('redirectPath')); //
this.$cookie.set('token', data.token) this.$cookie.set('token', data.token)
// //
// const redirectPath = localStorage.getItem('redirectPath') || '/home';
// console.log('Redirecting to:', redirectPath); //
// this.$router.replace(redirectPath); //
this.$router.replace({name: 'home'})
const redirectPath = localStorage.getItem('redirectPath') || '';
//
const pathsToRedirect = ['/auth-authQuote', '/auth-authInquiry'];
if (pathsToRedirect.some(path => redirectPath.indexOf(path) !== -1)) {
this.$router.replace(redirectPath);
} else {
this.$router.replace({ name: 'home' });
}
console.log('Redirecting to:', redirectPath); //
this.$i18n.locale=data.language this.$i18n.locale=data.language
localStorage.setItem('locale', data.language) localStorage.setItem('locale', data.language)
localStorage.setItem('refresh', "0") localStorage.setItem('refresh', "0")

14
src/views/modules/auth/authInquiry.vue

@ -315,13 +315,13 @@ import OssComponents from "../oss/ossComponents.vue";
import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table"; import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
export default { export default {
// beforeRouteEnter(to, from, next) {
// next((vm) => {
// // redirectPath
// localStorage.removeItem('redirectPath');
// console.log('redirectPath ');
// });
// },
beforeRouteEnter(to, from, next) {
next((vm) => {
// redirectPath
localStorage.removeItem('redirectPath');
console.log('redirectPath 已清除');
});
},
computed: { computed: {
statusDisplay() { statusDisplay() {
return this.inquiryInfoData.status === 'C' ? '草稿' : (this.inquiryInfoData.status === 'B' ? '已下达' : '已报价') return this.inquiryInfoData.status === 'C' ? '草稿' : (this.inquiryInfoData.status === 'B' ? '已下达' : '已报价')

14
src/views/modules/auth/authQuote.vue

@ -218,13 +218,13 @@ import QuoteDetail from "../quote/detail/quoteDetail.vue";
import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table"; import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
export default { export default {
// beforeRouteEnter(to, from, next) {
// next((vm) => {
// // redirectPath
// localStorage.removeItem('redirectPath');
// console.log('redirectPath ');
// });
// },
beforeRouteEnter(to, from, next) {
next((vm) => {
// redirectPath
localStorage.removeItem('redirectPath');
console.log('redirectPath 已清除');
});
},
computed: { computed: {
// quotationInformationFlag () { // quotationInformationFlag () {
// return (value) => { // return (value) => {

18
src/views/modules/inquiry/inquiryApplication.vue

@ -954,6 +954,24 @@ export default {
fixed: '', fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{
userId: this.$store.state.user.name,
functionId: 5022,
serialNumber: '5022Table1BomStatus',
tableId: '5022Table1',
tableName: '询价信息表',
columnProp: 'bomStatus',
headerAlign: 'center',
align: 'center',
columnLabel: 'BOM状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5022, functionId: 5022,

Loading…
Cancel
Save