Commit a947e560 authored by Bill's avatar Bill

fix: 修改加工列表页搜索

parent 46372949
......@@ -162,7 +162,7 @@ const Add: React.FC<{}> = () => {
})
// 当物流为 物流时,那么填充
onFieldMount$('receivefullAddress').subscribe((state) => {
PublicApi.getLogisticsReceiverAddressPage({current: '1', pageSize: '10'})
PublicApi.getLogisticsReceiverAddressPage({current: '1', pageSize: '99'})
.then((res) => {
let options = [];
if(res.code === 1000) {
......
......@@ -124,7 +124,7 @@ const basicTab = {
{
type: 'value:visible',
target: '*(receivefullAddress, receiveAddressID, receiveAddress,receiveUserName,receiveUserTel)',
condition: '{{$value == 1}}'
condition: '{{$value === 1}}'
},
],
},
......
......@@ -19,7 +19,7 @@ export const docTime = [{label: '单据时间(全部)', value: 0}].concat(co
/**
* 下单时间
*/
export const orderTime = [{label: '单据时间(全部)', value: 0}].concat(commonTimeList);
export const orderTime = [{label: '订单时间(全部)', value: 0}].concat(commonTimeList);
......@@ -142,6 +142,14 @@ export const ASSINGN_TITLE_MAPS = {
[ASSIGN_PENDING_SUBMIT]: PENDING_SUBMIT_TITLE,
}
export const COMFIRM_TITLE_MAPS = {
[CONFIRM_QUERY]: '生产通知单查询',
[CONFIRM_PENDING_SUBMIT]: '待提交生产通知单',
[CONFIRM_PENDING_FIRST]: '待审核生产通知单(一级)',
[CONFIRM_PENDING_SECOND]: '待审核生产通知单(二级)',
[CONFIRM_PENDING_CONFIRM]: '待确认生产通知单'
}
// export const DETAIL_PATH = {
......
import React, { useState } from 'react';
import React, { useState, useCallback } from 'react';
import { Modal} from 'antd';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
......@@ -7,14 +7,14 @@ import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { schema } from './schema';
const actions = createAsyncFormActions();
const { onFieldInit$ } = FormEffectHooks
const { onFieldInit$, onFieldMount$ } = FormEffectHooks
const EnterPrise = ({visible, cancel, ...restProps}) => {
const [selectRow, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId', type: 'radio' });
const fetchData = async (params: any) => {
const fetchData = useCallback(async (params: any) => {
let res = await PublicApi.getMemberManageLowerPageBynamerole(params);
return res;
};
}, []);
const onOk = () => {
restProps.onOk(memberRowCtl)
......@@ -22,6 +22,7 @@ const EnterPrise = ({visible, cancel, ...restProps}) => {
}
const effects = () => {
// 使用onFieldMount 会执行两次,暂时不知道为什么
onFieldInit$('roleId').subscribe((fieldState) => {
PublicApi.getMemberManageRoleSubList().then(res => {
let options = []
......@@ -35,7 +36,6 @@ const EnterPrise = ({visible, cancel, ...restProps}) => {
})
}
return (
<Modal
title="选择加工企业"
......@@ -44,14 +44,17 @@ const EnterPrise = ({visible, cancel, ...restProps}) => {
onCancel={cancel}
onOk={onOk}
>
<SearchForm
{
visible
? <SearchForm
request={fetchData}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: selectRow}}
></SearchForm>
: null
}
</Modal>
)
}
......
......@@ -23,16 +23,6 @@ const expandRowColumn = [
const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
// const [mainTableSelectRow, mainTableSelectRowCtl] = useRowSelectionTable({customKey: 'id'});
const [selectRow, selectRowCtl] = useRowSelectionTable({
customKey: 'fullId',
extendsSelection: {
getCheckboxProps: record => ({
disabled: record.purchaseCount - (record.processNum || 0) <= 0,
}),
}
});
const fetchData = useCallback(async (params: any) => {
const {orderTime, ...rest} = params
const {st, et} = timeRange(orderTime);
......@@ -85,12 +75,8 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
},
// defaultExpandAllRows: true
}
// console.log("rowSelection",rowSelection);
const handleSubmit = () => {
// console.log(selectRowCtl, mainTableSelectRowCtl);
// console.log(selectRowCtl)
// restProps.onOk(selectRowCtl)
restProps.onOk()
cancel();
}
......@@ -117,7 +103,9 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
</div>
}
>
<SearchForm
{
visible
? <SearchForm
request={fetchData}
components={{Table}}
schema={schema}
......@@ -127,6 +115,9 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
expandable: expandable
}}
></SearchForm>
: null
}
</Drawer>
)
}
......
......@@ -96,11 +96,11 @@ export const schema = {
}
}
},
supplyMembersId: {
supplyMembersName: {
type: 'string',
'x-component': 'Select',
'x-component': 'Input',
'x-component-props': {
placeholder: '请选择采购会员',
placeholder: '请填写采购会员',
allowClear:true,
style: {
width: '150px',
......
......@@ -19,7 +19,8 @@ import {
CONFIRM_PENDING_SECOND,
CONFIRM_PENDING_CONFIRM,
SUPPLIER_OUTER_STATUS_COLOR,
PROCESS_OUTER_STATUS_COLOR
PROCESS_OUTER_STATUS_COLOR,
COMFIRM_TITLE_MAPS
} from '../../common'
import { timeRange } from '@/utils';
......@@ -214,7 +215,7 @@ const Query: React.FC<{}> = (props) => {
return (
<PageHeaderWrapper
title={'生产通知单查询'}
title={COMFIRM_TITLE_MAPS[pathname] || '生产通知单查询'}
>
<Card>
<StandardTable
......
......@@ -205,8 +205,8 @@ export const pendingFirstQuerySchema: ISchema = {
},
docTime: {
type: 'string',
default: undefined,
enum: [],
default: 0,
enum: docTime,
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
......
......@@ -96,12 +96,7 @@ export function timeRange(val: number) {
).valueOf();
break;
case 7:
st = moment(
moment()
.year(moment().year() - 1)
.startOf('year')
.format('YYYY-MM-DD HH:mm:ss'),
).valueOf();
st = moment('1971-01-01', 'YYYY-MM-DD').valueOf(); // 或者0
et = moment(
moment()
.year(moment().year() - 1)
......
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