Commit 4b331284 authored by Bill's avatar Bill

fix: 修改跳转链接以及新增物料时报错bug

parent 57e4b125
...@@ -19,7 +19,7 @@ import { Link } from 'umi'; ...@@ -19,7 +19,7 @@ import { Link } from 'umi';
* 物料审核流程规则配置 * 物料审核流程规则配置
*/ */
const formActions = createFormActions(); const formActions = createFormActions();
const CREATE_URL = '/memberCenter/material/materialAuditProcessConfig/add' const CREATE_URL = '/memberCenter/commodityAbility/material/materialAuditProcessConfig/add'
const MaterialAuditProcessConfig = () => { const MaterialAuditProcessConfig = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
...@@ -50,7 +50,7 @@ const MaterialAuditProcessConfig = () => { ...@@ -50,7 +50,7 @@ const MaterialAuditProcessConfig = () => {
dataIndex: 'processId', dataIndex: 'processId',
render: (text, record) => { render: (text, record) => {
return ( return (
<Link to={`/memberCenter/material/materialAuditProcessConfig/detail?id=${record.processId}`}> <Link to={`/memberCenter/commodityAbility/material/materialAuditProcessConfig/detail?id=${record.processId}`}>
{record.processId} {record.processId}
</Link> </Link>
) )
...@@ -82,7 +82,7 @@ const MaterialAuditProcessConfig = () => { ...@@ -82,7 +82,7 @@ const MaterialAuditProcessConfig = () => {
} }
return ( return (
<Space> <Space>
<Link to={`/memberCenter/material/materialAuditProcessConfig/edit?id=${record.processId}`}> <Link to={`/memberCenter/commodityAbility/material/materialAuditProcessConfig/edit?id=${record.processId}`}>
修改 修改
</Link> </Link>
{ {
......
...@@ -71,7 +71,7 @@ const MaterialAdd = (props) => { ...@@ -71,7 +71,7 @@ const MaterialAdd = (props) => {
if (!formatInitialValue) { if (!formatInitialValue) {
return return
} }
if (formatInitialValue.interiorState === FROZEN) { if (formatInitialValue?.interiorState === FROZEN) {
formActions.setFieldState('changeCard', (state) => { formActions.setFieldState('changeCard', (state) => {
FormPath.setIn(state, 'visible', true); FormPath.setIn(state, 'visible', true);
}) })
...@@ -184,14 +184,12 @@ const MaterialAdd = (props) => { ...@@ -184,14 +184,12 @@ const MaterialAdd = (props) => {
: {} : {}
/** 物料是否变更 */ /** 物料是否变更 */
const withChangeData = formatInitialValue.interiorState === FROZEN const withChangeData = formatInitialValue?.interiorState === FROZEN
? { ? {
changeRemark: rest.changeRemark, changeRemark: rest.changeRemark || '',
change: 1, change: 1,
} }
: { : {}
change: 1,
}
/** 物料组 */ /** 物料组 */
const withMaterialGroup = materialGroup const withMaterialGroup = materialGroup
......
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