Commit 61354f81 authored by xiexiuxing's avatar xiexiuxing

合并到本地

parents ee092323 ab1f6edc
...@@ -34,7 +34,8 @@ const homeRoute = { ...@@ -34,7 +34,8 @@ const homeRoute = {
key: 'home', key: 'home',
component: '@/pages/home', component: '@/pages/home',
}; };
const routes = isDev ? [ homeRoute, OrderRoute ] : asyncRoutes; // isDev ? [ homeRoute, OrderRoute ] :
const routes = asyncRoutes;
// const routes = isDev ? [ CommodityRoute ] : asyncRoutes; // const routes = isDev ? [ CommodityRoute ] : asyncRoutes;
const memberCenterRoute = { const memberCenterRoute = {
......
...@@ -614,6 +614,7 @@ export default { ...@@ -614,6 +614,7 @@ export default {
'purchaseRequisition.qingshuruqinggouDigest': '请输入请购单摘要', 'purchaseRequisition.qingshuruqinggouDigest': '请输入请购单摘要',
'purchaseRequisition.qingshurugongying': '请输入供应会员名称', 'purchaseRequisition.qingshurugongying': '请输入供应会员名称',
'purchaseRequisition.qingshuruqinggouDepartment': '请输入请购部门', 'purchaseRequisition.qingshuruqinggouDepartment': '请输入请购部门',
'purchaseRequisition.qingshuruqinggouPenson': '请输入请购人',
'purchaseRequisition.qingshuruqinggouUse': '请输入请购用途', 'purchaseRequisition.qingshuruqinggouUse': '请输入请购用途',
'purchaseRequisition.qingxuanzeneibu': '请选择内部状态', 'purchaseRequisition.qingxuanzeneibu': '请选择内部状态',
'purchaseRequisition.kaishishijian': '开始时间', 'purchaseRequisition.kaishishijian': '开始时间',
......
...@@ -67,6 +67,18 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) => ...@@ -67,6 +67,18 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) =>
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' }) placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' })
} }
}, },
"qinggouPenson": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouPenson', defaultMessage: '请输入请购人' }),
showSearch: true,
// defaultActiveFirstOption: false,
// showArrow: false,
// filterOption: false,
onSearch: '{{handleSearch}}'
},
enum: []
},
"purpose": { "purpose": {
type: 'string', type: 'string',
"x-component-props": { "x-component-props": {
...@@ -146,6 +158,18 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => { ...@@ -146,6 +158,18 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' }) placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' })
} }
}, },
"qinggouPenson": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouPenson', defaultMessage: '请输入请购人' }),
showSearch: true,
// defaultActiveFirstOption: false,
// showArrow: false,
// filterOption: false,
onSearch: '{{handleSearch}}'
},
enum: []
},
"purpose": { "purpose": {
type: 'string', type: 'string',
"x-component-props": { "x-component-props": {
......
import { getProductSelectGetSelectBrand } from "@/services/ProductV2Api"
export const searchOptionEffect = (context: any, fieldName: string) => {
context.getFieldState(fieldName, state => {
getProductSelectGetSelectBrand({ name: state.props['x-component-props'].searchValue }).then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data
})
})
})
}
...@@ -12,6 +12,8 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke ...@@ -12,6 +12,8 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less' import '../index.less'
import { tableListSchema } from '../constant' import { tableListSchema } from '../constant'
import { getPurchaseRequisitionCreatePage } from '@/services/PurchaseV2Api' import { getPurchaseRequisitionCreatePage } from '@/services/PurchaseV2Api'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { searchOptionEffect } from './effect';
// 待新增请购单 // 待新增请购单
...@@ -28,6 +30,15 @@ const ReadyAddBill:React.FC<ReadyAddBillProps> = () => { ...@@ -28,6 +30,15 @@ const ReadyAddBill:React.FC<ReadyAddBillProps> = () => {
const clickAdd = () => { const clickAdd = () => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/readyAddBill/add`) history.push(`/memberCenter/procurementAbility/purchaseRequisition/readyAddBill/add`)
} }
const formActions = createFormActions();
const handleSearch = value => {
if (!value) {
formActions.setFieldState('qinggouPenson', fieldState => {
fieldState.props.enum = [];
});
return;
}
};
return <PageHeaderWrapper> return <PageHeaderWrapper>
<Card> <Card>
...@@ -50,6 +61,9 @@ const ReadyAddBill:React.FC<ReadyAddBillProps> = () => { ...@@ -50,6 +61,9 @@ const ReadyAddBill:React.FC<ReadyAddBillProps> = () => {
'requisitionNo', 'requisitionNo',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchOptionEffect(actions, 'brandId')
})
}, },
components: { components: {
DateRangePickerUnix, DateRangePickerUnix,
......
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