Commit 480e8e72 authored by 前端-许佳敏's avatar 前端-许佳敏

fix: getAuth更新

parent 09476c72
......@@ -16,6 +16,7 @@ import { PublicApi } from '@/services/api';
const { Option } = Select;
import { Schema } from "./schema"
import style from '../../../constants/styles.less'
import { getAuth } from '@/utils/auth';
const AddInfo = (props: any) => {
const { currentRef, getcontractId, sourceType, paymentId } = props;
......@@ -180,7 +181,7 @@ const AddInfo = (props: any) => {
})
setTag(tagList)
getcontractId({ flag: sourceType == 1 || sourceType == 2 ? false : true, selectRow })
const auth = JSON.parse(localStorage.getItem('auth'));
const auth = getAuth();
setaccount(auth.account);
setBasics(basicsData)
attrValueForm.setFieldsValue(basicsData);
......
......@@ -8,6 +8,7 @@ import Basic from './components/basic';
import Offer from './components/offer';
import Explain from './components/explain';
import File from './components/file';
import { getAuth } from '@/utils/auth';
const { TabPane } = Tabs;
......@@ -93,7 +94,7 @@ const AddForm = () => {
}, [])
const handleSubmit = async () => {
const { memberId, memberRoleId, name } = JSON.parse(localStorage.getItem('auth'));
const { memberId, memberRoleId, name } = getAuth();
const basicRef = await currentBasic.current.get();
const explainRef = await currentExplain.current.get();
const offerRef = await currentOffer.current.get();
......
......@@ -13,6 +13,7 @@ import {
GetPurchasePurchaseInquiryDetailsResponse
} from '@/services/PurchaseApi/id4177';
import { PublicApi } from '@/services/api';
import { getAuth } from '@/utils/auth';
const { TabPane } = Tabs;
......@@ -26,7 +27,7 @@ const TabFormErrors = (props) => {
const AddForm = () => {
const { id, number } = history.location.query;
const { memberId, memberRoleId, name } = JSON.parse(localStorage.getItem('auth'));
const { memberId, memberRoleId, name } = getAuth();
/** 基本信息 */
const [basic, setBasic] = useState<any>({});
/** 添加采购物料 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment