Commit 8d8d95fb authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修改采购计划需求计划内部状态

parent 7069a4d5
......@@ -5,7 +5,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import RequireItem from '@/components/RequireItem';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { SELECT_NAME, DOORTYPE } from '@/constants';
import { SELECT_NAME, DOORTYPE } from '@/constants/procurement';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs
const layout: any = {
......
......@@ -29,6 +29,7 @@ import {
DEMANDPLAN_SECHEMA
} from '../../schema/demandPlan';
import {
PURCHASEPLANSERCH_SECHEMA,
PURCHASEPLAN_SECHEMA
} from '../../schema/purchasePlan';
import {
......@@ -61,6 +62,7 @@ interface Iprops {
'DEMANDPLANSERCH_SECHEMA' |
'DEMANDPLANADDED_SECHEMA' |
'DEMANDPLAN_SECHEMA' |
'PURCHASEPLANSERCH_SECHEMA' |
'PURCHASEPLAN_SECHEMA' |
'PURCHASEBIDORDER_SCHEMA' |
'PURCHASEBIDREADYADD_SCHEMA' |
......@@ -119,6 +121,8 @@ const Table: React.FC<Iprops> = (props: any) => {
return DEMANDPLANADDED_SECHEMA;
case 'DEMANDPLAN_SECHEMA':
return DEMANDPLAN_SECHEMA;
case 'PURCHASEPLANSERCH_SECHEMA':
return PURCHASEPLANSERCH_SECHEMA;
case 'PURCHASEPLAN_SECHEMA':
return PURCHASEPLAN_SECHEMA;
case 'PURCHASEBIDORDER_SCHEMA':
......@@ -169,12 +173,14 @@ const Table: React.FC<Iprops> = (props: any) => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
externalStatusFetch && externalStatusFetch().then(res => {
const _enum = res.data.map((item) => {return { label: item.name, value: item.satatus }})
const _enum = res.data.map((item) => {return { label: item.name || item.message, value: item.satatus || item.code }})
linkage.enum('externalState',_enum)
linkage.enum('externalStatusList',_enum)
})
interiorStatusFetch && interiorStatusFetch().then(res => {
const _enum = res.data.map((item) => {return { label: item.name, value: item.satatus }})
const _enum = res.data.map((item) => {return { label: item.name || item.message, value: item.satatus || item.code }})
linkage.enum('interiorState',_enum)
linkage.enum('innerStatusList',_enum)
})
})
......
......@@ -57,12 +57,15 @@ const DemandPlanSearch = () => {
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}];
return (
<Table
schemaType="DEMANDPLANSERCH_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanAllList}
interiorStatusFetch={PublicApi.getPurchaseNeedPlanInner}
/>
)
}
......
......@@ -14,8 +14,6 @@ import styles from './index.less'
import { getAuth } from '@/utils/auth'
import { isEmpty } from '@formily/antd/esm/shared'
import { UPLOAD_TYPE } from '@/constants'
import CategorySelect from '@/components/CategorySelect'
import { yearProcessAmount, plantArea, staffNum } from '@/constants';
interface PurchasInfoPropsType {
SiteStore: {
......
......@@ -5,7 +5,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import RequireItem from '@/components/RequireItem';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { SELECT_NAME, DOORTYPE } from '@/constants';
import { SELECT_NAME, DOORTYPE } from '@/constants/procurement';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs
const layout: any = {
......
......@@ -134,7 +134,7 @@ const DemandDetailed = () => {
}
components={
<Fragment>
<ProgressLayout />
<ProgressLayout logstate={2} />
<BasicLayout effect={basicEffect} />
<DemandPlanMaterialLayout
id={id}
......
......@@ -58,10 +58,11 @@ const PurchasePlanSearch = () => {
return (
<Table
schemaType="DEMANDPLAN_SECHEMA"
schemaType="PURCHASEPLANSERCH_SECHEMA"
columns={columns}
effects="needPlanNo"
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanAllList}
interiorStatusFetch={PublicApi.getPurchaseNeedPlanInner}
/>
)
}
......
......@@ -67,7 +67,7 @@ export const DEMANDPLANSERCH_SECHEMA: ISchema = {
width: 160
}
},
enum: DEMANDPLANINTERNALSTATE
enum: []
},
}
},
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/** 采购需求查询 */
export const PURCHASEPLANSERCH_SECHEMA: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
purchasePlanNo: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props": {
placeholder: '采购计划编号',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]: {
type: 'object',
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
justifyContent: 'flex-start',
flexWrap: 'nowrap'
},
colStyle: {//改变间隔
marginRight: 20
}
},
properties: {
PRO_LAYOUT: {
type: 'object',
"x-component": 'mega-layout',
"x-mega-props": {
span: 5
},
"x-component-props": {
inline: true
},
properties: {
summary: {
type: 'string',
"x-component-props": {
placeholder: '需求计划摘要',
}
},
"[startTime,endTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '需求计划周期',
}
},
innerStatusList: {
type: 'string',
"x-component-props": {
placeholder: '内部状态',
style: {
width: 160
}
},
enum: []
},
}
},
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
/** 待提交审核采购计划(一级) & (二级) & 待提交审核采购计划 & 待执行采购计划 */
export const PURCHASEPLAN_SECHEMA: ISchema = {
type: 'object',
......
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