Commit 6d745d4f authored by 前端-李俊鑫's avatar 前端-李俊鑫

fix: 规格引擎列表调整、获取角色接口添加过滤掉超级管理员的参数

parent ce8451f4
......@@ -7,8 +7,7 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getPurchaseRequisitionProcessEnginePage } from '@/services/PurchaseV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns';
const MaterialManageRule: React.FC = () => {
......@@ -16,7 +15,7 @@ const MaterialManageRule: React.FC = () => {
const btnAuthOfOperationTextMap = { '配置': 'buyingRequisitionRule.config' }
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=BUYING_REQUISITION&processId=${record.processId}`)
configOperationHandler(record, 'BUYING_REQUISITION')
}}
return (
<TableOperation
......
import { ColumnType } from 'antd/lib/table/interface';
import { Tag } from 'antd'
import { message, Tag } from 'antd'
import { STATUS_COLOR, STATUS_NAME } from '../../constants'
import { id, name, processName, createTime, operation, status } from '../../columns';
import { id, name, processName, createTime, operation, status } from '../../columns'
import { history } from 'umi'
/** 流程规则ID */
export const column_id = {
......@@ -43,3 +44,11 @@ export const column_status: ColumnType<any> = {
/** 操作 */
export const column_operation = operation
export const configOperationHandler = (record: any, type: string) => {
if (record.processKind === 1) {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=${type}&processId=${record.processId}`)
return
}
message.warning('当前流程无需配置')
}
......@@ -7,16 +7,15 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getContractRuleEngineCoordinationPage } from '@/services/ContractV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns';
const ContractCoordinationRule: React.FC = () => {
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = { '配置': 'contractCoordinationRule.config' }
const buttonGroup = { '配置': record.processKind === 1 } // 内部流程才展示
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=CONTRACT_COORDINATION&processId=${record.processId}`)
configOperationHandler(record, 'CONTRACT_COORDINATION')
}}
return (
<TableOperation
......
......@@ -7,16 +7,15 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getContractRuleEngineProcessPage } from '@/services/ContractV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns';
const ContractManageRule: React.FC = () => {
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = { '配置': 'contractManageRule.config' }
const buttonGroup = { '配置': record.processKind === 1 } // 内部流程才展示
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=CONTRACT_MANAGE&processId=${record.processId}`)
configOperationHandler(record, 'CONTRACT_MANAGE')
}}
return (
<TableOperation
......
......@@ -7,16 +7,15 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getProductMaterialProcessEnginePage } from '@/services/ProductV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns';
const BuyingRequisitionRule: React.FC = () => {
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = { '配置': 'materialManageRule.config' }
const buttonGroup = { '配置': record.processKind === 1 } // 内部流程才展示
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=MATERIAL_MANAGE&processId=${record.processId}`)
configOperationHandler(record, 'MATERIAL_MANAGE')
}}
return (
<TableOperation
......
......@@ -7,16 +7,15 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getOrderPurchaseProcessEnginePage } from '@/services/OrderNewV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processRuleType, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processRuleType, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns';
const PurchaseProcessRule: React.FC = () => {
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = { '配置': 'purchaseProcessRule.config' }
const buttonGroup = { '配置': record.processKind === 1 } // 内部流程才展示
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=PURCHASE_PROCESS&processId=${record.processId}`)
configOperationHandler(record, 'PURCHASE_PROCESS')
}}
return (
<TableOperation
......
......@@ -7,16 +7,15 @@ import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import { getSettleAccountsApplyAmountProcessEffectiveStatus } from '@/services/SettleV2Api'
import CommonTable from '../component/CommonTable'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation } from '../columns';
import { history } from 'umi'
import { column_id, column_name, column_processName, column_status, column_createTime, column_operation, configOperationHandler } from '../columns'
const RequestFundsManageRule: React.FC = () => {
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = { '配置': 'requestFundsManageRule.config' }
const buttonGroup = { '配置': record.processKind === 1 } // 内部流程才展示
const buttonGroup = { '配置': true }
const operationHandler = { '配置': () => {
history.push(`/memberCenter/systemSetting/ruleEng/ruleEngConfig?type=REQUEST_FUNDS_MANAGE&processId=${record.processId}`)
configOperationHandler(record, 'REQUEST_FUNDS_MANAGE')
}}
return (
<TableOperation
......
......@@ -60,7 +60,7 @@ const ProcessRules: React.FC<PropsType> = ({ form, filedTypeOptions, onFormField
// 获取角色拉下数据
const getMemberRoleData = async () => {
const { code, data } = await getMemberRolePage({ status: '1' } as any)
const { code, data } = await getMemberRolePage({ status: '1', typeEnum: 0 } as any)
if (code === 1000) {
let ruleEngineConfigFieldRelations = form.getFieldValue('ruleEngineConfigFieldRelations')
let selectRoles: any = {}
......@@ -138,7 +138,7 @@ const ProcessRules: React.FC<PropsType> = ({ form, filedTypeOptions, onFormField
setHandleRender(val => !val)
}
// 若某品类字段已选的品类,其他品类字段则不可选
// 若某物料字段已选全部物料,其他物料字段不可操作
// code-RULE-ruleFieldKey-FIELD-fieldFieldKey
const onQueryAllChange = (key: string, value: any, isDelete?: boolean) => {
const newIsQueryAll = { ...cacheIsQueryAllRef.current }
......
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