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);
......@@ -70,7 +70,7 @@ export const CONFIRM_PENDING_CONFIRM_DETAIL = CONFIRM_PENDING_CONFIRM + DETAIL;
export const QUERY_SEARCH_NAME = "noticeNo";
/**
* 指派生产通知单-待新增生产通知单列表页
* 指派生产通知单-待新增生产通知单列表页
*/
export const TO_BE_ADD_QUERY_SEARCH_NAME = "noticeNo";
......@@ -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 = {
......@@ -165,7 +173,7 @@ export const INNER_STATUS_BADGE_COLOR = {
/**
* 指派生产通知单-> 列表页 -> 内部状态: 只有四种装填:待审核, 待提交审核通知单- 审核不通过, 审核通过
*/
// supplierInnerStatus,
// supplierInnerStatus,
export const SUPPLIER_INNER_STATUS_COLOR = {
"1": "default",
"2": "warning",
......@@ -214,7 +222,7 @@ export const CONFIRM_DETAIL_INNER_STATUS_COLOR = [
"green", // 完成
]
type SUPPLIER_OUTER_STATUS_COLOR_TYPE = ("default" | "primary" | "danger"| "success" | "warning")[]
type SUPPLIER_OUTER_STATUS_COLOR_TYPE = ("default" | "primary" | "danger"| "success" | "warning")[]
/**
* 指派生产通知单 -> 列表页 -> 外部状态
*/
......@@ -236,10 +244,10 @@ export const PROCESS_OUTER_STATUS_COLOR: ("default" | "processing" | "error"| "s
"warning", // 待审核 processInnerStatus = 2,
"error", // 待审核(1级) processInnerStatus = 3 不通过
"success", // 待审核(2级) processInnerStatus = 4 审核通过
"processing", // 待新增加工发货单 processInnerStatus = 5
"warning", // 待审核加工发货单 processInnerStatus = 6
"processing", // 待新增加工发货单 processInnerStatus = 5
"warning", // 待审核加工发货单 processInnerStatus = 6
"default", // 待新增物流单 processInnerStatus = 7
"processing", // 待确认物流单 processInnerStatus = 8
"processing", // 待确认物流单 processInnerStatus = 8
"warning", // 待确认发货 processInnerStatus = 9
"success", // 已确认发货 processInnerStatus = 10
"default", // processInnerStatus = 11 待确认回单
......@@ -316,7 +324,7 @@ export const DELIEVER_AND_RECEIVE_INNER_STATUS = {
'5_1': 1,
'5_2': 2,
'7_1': 3,
'7_2': 4,
'8_1': 5,
'7_2': 4,
'8_1': 5,
'8_2': 6
}
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
request={fetchData}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: selectRow}}
></SearchForm>
{
visible
? <SearchForm
request={fetchData}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: selectRow}}
></SearchForm>
: null
}
</Modal>
)
}
......
......@@ -19,7 +19,7 @@ const columns = [
title: '会员等级',
dataIndex: 'levelTag'
}
]
]
export const schema = {
type: 'object',
......@@ -98,7 +98,7 @@ export const schema = {
}
}
},
queryBtn: {
type: 'string',
'x-component': 'Submit',
......@@ -106,7 +106,7 @@ export const schema = {
"children": "查询",
}
}
}
}
}
}
},
......@@ -138,4 +138,4 @@ export const schema = {
}
},
}
}
\ No newline at end of file
}
......@@ -104,4 +104,4 @@ const SearchForm = (props) => {
)
}
export default SearchForm
\ No newline at end of file
export default SearchForm
......@@ -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,16 +103,21 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
</div>
}
>
<SearchForm
request={fetchData}
components={{Table}}
schema={schema}
actions={actions}
expressionScope={{
// rowSelection: tableSelectRow(),
expandable: expandable
}}
></SearchForm>
{
visible
? <SearchForm
request={fetchData}
components={{Table}}
schema={schema}
actions={actions}
expressionScope={{
// rowSelection: tableSelectRow(),
expandable: expandable
}}
></SearchForm>
: null
}
</Drawer>
)
}
......
......@@ -21,7 +21,7 @@ const columns = [
return ORDER_TYPE[text];
}
}
]
]
export const schema = {
type: 'object',
......@@ -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',
......@@ -150,7 +150,7 @@ export const schema = {
"children": "查询",
}
}
}
}
}
}
},
......@@ -183,4 +183,4 @@ export const schema = {
}
},
}
}
\ No newline at end of file
}
......@@ -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