删除无用代码, 工具类和 组件 没有删除 , 以后可以借鉴写法和创建规则
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { getDefId as getDefById } from '@/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/service';
|
||||
import { getRoomDataById, getSectionDataById } from '@/services/common';
|
||||
import { message } from 'antd';
|
||||
import { getProTypeCodeByBidMethodDict, getURLInformation, getUrlRelativePath, isEmpty } from './CommonUtils';
|
||||
@ -276,51 +275,7 @@ export interface projectDataItem {
|
||||
returnURL?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目跟进项目经理
|
||||
* @param projectData
|
||||
*/
|
||||
export function followUpAProjectManager(projectData: projectDataItem): Promise<boolean> {
|
||||
removePurchaseCanOperate();
|
||||
return new Promise<boolean>(resolve => {
|
||||
getDefById(projectData.id).then((res) => {
|
||||
if (res?.code == 200) {
|
||||
let proTypeCode = getURLInformation('proTypeCode');
|
||||
sessionStorage.setItem('proTypeCode', proTypeCode === null ? getProTypeCodeByBidMethodDict(projectData.bidMethodDict) : proTypeCode);
|
||||
sessionStorage.setItem('defId', JSON.stringify(res.data));
|
||||
sessionStorage.setItem('projectData', JSON.stringify(projectData));
|
||||
let returnURL = projectData.returnURL ? projectData.returnURL : getUrlRelativePath();
|
||||
sessionStorage.setItem('returnURL', returnURL);
|
||||
resolve(true);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目跟进供应商
|
||||
* @param projectData
|
||||
*/
|
||||
export function followUpAProjectSupplier(projectData: projectDataItem): Promise<boolean> {
|
||||
removePurchaseCanOperate();
|
||||
return new Promise<boolean>(resolve => {
|
||||
if (projectData?.id == undefined || projectData?.id == null) {
|
||||
message.error("项目数据错误,无法获取流程,请联系管理员")
|
||||
} else {
|
||||
getDefById(projectData?.id).then((res) => {
|
||||
if (res?.code == 200) {
|
||||
let proTypeCode = getURLInformation('proTypeCode');
|
||||
sessionStorage.setItem('proTypeCode', proTypeCode === null ? getProTypeCodeByBidMethodDict(projectData.bidMethodDict) : proTypeCode);
|
||||
sessionStorage.setItem('defId', JSON.stringify(res.data));
|
||||
sessionStorage.setItem('projectData', JSON.stringify(projectData));
|
||||
let returnURL = projectData.returnURL ? projectData.returnURL : getUrlRelativePath();
|
||||
sessionStorage.setItem('returnURL', returnURL);
|
||||
resolve(true);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 内拍项目跟进
|
||||
@ -373,7 +328,7 @@ export function removePurchaseCanOperate() {
|
||||
}
|
||||
/**
|
||||
* 获取returnURL
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function getReturnURL() {
|
||||
let returnURL = sessionStorage.getItem('returnURL');
|
||||
@ -382,7 +337,7 @@ export function getReturnURL() {
|
||||
|
||||
/**
|
||||
* 获取getRoomReturnURL
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function getRoomReturnURL() {
|
||||
let roomReturnURL = sessionStorage.getItem('roomReturnURL');
|
||||
@ -391,7 +346,7 @@ export function getRoomReturnURL() {
|
||||
|
||||
/**
|
||||
* 获取当前评审室对应标段的报价类型(只能在评审室内使用)
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function getSectionQuot() {
|
||||
let returnURL = sessionStorage.getItem('sectionQuot');
|
||||
@ -400,7 +355,7 @@ export function getSectionQuot() {
|
||||
|
||||
/**
|
||||
* 根据评审室id获取标段的报价类型
|
||||
* @param roomId
|
||||
* @param roomId
|
||||
* @returns 1-%(优惠率,折扣率) 0-元(总价,单价)
|
||||
*/
|
||||
export async function getQuotationMethodById(roomId: any) {
|
||||
@ -424,9 +379,9 @@ export async function getQuotationMethodById(roomId: any) {
|
||||
}
|
||||
/**
|
||||
* 存储角色信息
|
||||
* @param {总数据} userData
|
||||
* @param {权限} role
|
||||
* @param {当前角色} roleData
|
||||
* @param {总数据} userData
|
||||
* @param {权限} role
|
||||
* @param {当前角色} roleData
|
||||
*/
|
||||
export function setUserData(userData: any, role: string, roleData: any): void {
|
||||
sessionStorage.setItem('userData', JSON.stringify(userData));
|
||||
|
Reference in New Issue
Block a user