Commit 1ee1a908 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents aa834097 c9b8cf43
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Input, Button } from 'antd'; import { Input, Button, message } from 'antd';
import { LinkOutlined } from '@ant-design/icons'; import { LinkOutlined } from '@ant-design/icons';
import styled from 'styled-components'; import styled from 'styled-components';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
...@@ -12,6 +12,7 @@ const RowStyleLayout = styled(props => <div {...props} />)` ...@@ -12,6 +12,7 @@ const RowStyleLayout = styled(props => <div {...props} />)`
border-color: #6b778c; border-color: #6b778c;
background-color: #6b778c; background-color: #6b778c;
border-radius: 0; border-radius: 0;
height: 100%;
} }
.ant-input-group-addon { .ant-input-group-addon {
...@@ -36,6 +37,7 @@ const Relevance = props => { ...@@ -36,6 +37,7 @@ const Relevance = props => {
tableProps = {}, tableProps = {},
fetchTableData, fetchTableData,
title = '选择', title = '选择',
tip = '', // 点击按钮前的提示,用于前提需要提示的场景
} = props.props['x-component-props']; } = props.props['x-component-props'];
const tableRowKey = tableProps.rowKey || 'id'; const tableRowKey = tableProps.rowKey || 'id';
...@@ -63,13 +65,21 @@ const Relevance = props => { ...@@ -63,13 +65,21 @@ const Relevance = props => {
setVisible(false); setVisible(false);
}; };
const handleModalVisible = () => {
if (!fetchTableData) {
message.warning(tip || '请传入 fetchTableData 属性,否则Table 将无法发起请求');
return;
}
setVisible(true);
};
return ( return (
<RowStyleLayout> <RowStyleLayout>
<Input <Input
value={ value={
tableRowLableKey ? tableRowLableKey ?
value.map(item => item[tableRowLableKey]).join(',') : value.map(item => item[tableRowLableKey]).join(',') :
'请指明 lableKey 值' ''
} }
addonAfter={( addonAfter={(
<> <>
...@@ -78,7 +88,7 @@ const Relevance = props => { ...@@ -78,7 +88,7 @@ const Relevance = props => {
type="primary" type="primary"
className="relevance" className="relevance"
icon={<LinkOutlined />} icon={<LinkOutlined />}
onClick={() => setVisible(true)} onClick={handleModalVisible}
block block
> >
{title} {title}
......
...@@ -335,6 +335,16 @@ export const ORDER_TYPE2 = { ...@@ -335,6 +335,16 @@ export const ORDER_TYPE2 = {
export const MEMBER_ROLE_TYPE_SERVICE_PROVIDER = 1; // 服务提供者 export const MEMBER_ROLE_TYPE_SERVICE_PROVIDER = 1; // 服务提供者
export const MEMBER_ROLE_TYPE_SERVICE_CONSUMER = 2; // 服务消费者 export const MEMBER_ROLE_TYPE_SERVICE_CONSUMER = 2; // 服务消费者
// 单据类型
export const DOC_TYPE_PURCHASE_RECEIPT = 'S001'; // 采购入库单
export const DOC_TYPE_SALES_INVOICE = 'S002'; // 销售发货单
export const DOC_TYPE_PROCESS_RECEIPT = 'S003'; // 加工入库单
export const DOC_TYPE_PROCESS_INVOICE = 'S004'; // 加工发货单
export const DOC_TYPE_RETURN_INVOICE = 'S005'; // 退货发货单
export const DOC_TYPE_RETURN_RECEIPT = 'S006'; // 退货入库单
export const DOC_TYPE_EXCHANGE_INVOICE = 'S007'; // 换货发货单
export const DOC_TYPE_EXCHANGE_RECEIPT = 'S008'; // 换货入库单
// 订单类型 // 订单类型
export enum OrderModalType { export enum OrderModalType {
......
...@@ -7,11 +7,12 @@ interface PicWrapProps { ...@@ -7,11 +7,12 @@ interface PicWrapProps {
const PicWrap: React.FC<PicWrapProps> = ({ pics = [] }) => ( const PicWrap: React.FC<PicWrapProps> = ({ pics = [] }) => (
<ul className={styles.list}> <ul className={styles.list}>
{pics.map((item, index) => ( {pics.map((item, index) =>
item ? (
<li key={index} className={styles['list-item']}> <li key={index} className={styles['list-item']}>
<img src={item} /> <img src={item} />
</li> </li>
))} ) : null)}
</ul> </ul>
); );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47 * @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-16 20:16:05 * @LastEditTime: 2020-09-17 21:17:00
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { FormEffectHooks, FormPath } from '@formily/antd'; import { FormEffectHooks, FormPath } from '@formily/antd';
...@@ -15,13 +15,22 @@ import { ...@@ -15,13 +15,22 @@ import {
DEPENDENT_DOC_RETURN, DEPENDENT_DOC_RETURN,
DEPENDENT_DOC_PRODUCTION, DEPENDENT_DOC_PRODUCTION,
DEPENDENT_DOC_INTERNAL, DEPENDENT_DOC_INTERNAL,
DOC_TYPE_PURCHASE_RECEIPT,
DOC_TYPE_SALES_INVOICE,
DOC_TYPE_PROCESS_RECEIPT,
DOC_TYPE_PROCESS_INVOICE,
DOC_TYPE_RETURN_INVOICE,
DOC_TYPE_RETURN_RECEIPT,
DOC_TYPE_EXCHANGE_INVOICE,
DOC_TYPE_EXCHANGE_RECEIPT,
} from '@/constants'; } from '@/constants';
import Search from '@/components/NiceForm/components/Search'; import Search from '@/components/NiceForm/components/Search';
import Submit from '@/components/NiceForm/components/Submit'; import Submit from '@/components/NiceForm/components/Submit';
import DateSelect from '@/components/NiceForm/components/DateSelect'; import DateSelect from '@/components/NiceForm/components/DateSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { orderBillSchema } from '../schema'; import { orderBillSchema, invoicesEnum } from '../schema';
import { a } from '@/pages/editor/configs/componentConfigs/HTML'; import { a } from '@/pages/editor/configs/componentConfigs/HTML';
const { const {
...@@ -143,6 +152,7 @@ const fetchOrderList = async (params: any) => { ...@@ -143,6 +152,7 @@ const fetchOrderList = async (params: any) => {
return []; return [];
}; };
// 获取关联组件对应的 params
const getParams = type => { const getParams = type => {
const params = { const params = {
modalProps: { modalProps: {
...@@ -217,10 +227,76 @@ const getParams = type => { ...@@ -217,10 +227,76 @@ const getParams = type => {
return params; return params;
}; };
const freeEnumItem = (data: {[key: string]: any}[], keyName: string, value: any) => {
if (!Array.isArray(data)) {
return;
}
data.forEach(item => {
if (item[keyName] === value) {
item.disabled = false;
} else {
item.disabled = true;
}
});
};
export const useBusinessEffects = (context, actions) => { export const useBusinessEffects = (context, actions) => {
const { getFieldValue, setFieldValue } = actions; const {
getFieldValue,
setFieldValue,
getFieldState,
setFieldState,
} = actions;
const linkage = useLinkageUtils(); const linkage = useLinkageUtils();
// 根据 单据类型 联动 对应单据所选项
onFieldValueChange$('invoicesTypeId').subscribe(fieldState => {
const origin = fieldState.originAsyncData;
const current = origin.find(item => item.id === fieldState.value);
const newEnum = [...getFieldState('relevanceInvoices', state => state.props.enum)];
if (!current) {
return;
}
switch (current.number) {
// 采购入库单、销售发货单只能选择 订单
case DOC_TYPE_PURCHASE_RECEIPT:
case DOC_TYPE_SALES_INVOICE: {
freeEnumItem(newEnum, 'value', DEPENDENT_DOC_ORDER);
break;
}
// 加工入库单、加工发货单只能选择 生产通知单
case DOC_TYPE_PROCESS_RECEIPT:
case DOC_TYPE_PROCESS_INVOICE: {
freeEnumItem(newEnum, 'value', DEPENDENT_DOC_PRODUCTION);
break;
}
// 退货发货单、退货入库单只能选择 退货申请单
case DOC_TYPE_RETURN_INVOICE:
case DOC_TYPE_RETURN_RECEIPT: {
freeEnumItem(newEnum, 'value', DEPENDENT_DOC_RETURN);
break;
}
// 换货发货单、换货入库单只能选择 换货申请单
case DOC_TYPE_EXCHANGE_INVOICE:
case DOC_TYPE_EXCHANGE_RECEIPT: {
freeEnumItem(newEnum, 'value', DEPENDENT_DOC_EXCHANGE);
break;
}
default: {
freeEnumItem(newEnum, 'value', DEPENDENT_DOC_INTERNAL);
break;
}
}
linkage.value('relevanceInvoices', undefined);
linkage.enum('relevanceInvoices', newEnum);
});
onFieldInputChange$('inventoryId').subscribe(fieldState => { onFieldInputChange$('inventoryId').subscribe(fieldState => {
const current = fieldState.originAsyncData.find(item => item.id === fieldState.value); const current = fieldState.originAsyncData.find(item => item.id === fieldState.value);
if (current) { if (current) {
...@@ -228,15 +304,16 @@ export const useBusinessEffects = (context, actions) => { ...@@ -228,15 +304,16 @@ export const useBusinessEffects = (context, actions) => {
} }
}); });
// 对应单据改变
onFieldValueChange$('relevanceInvoices').subscribe(fieldState => { onFieldValueChange$('relevanceInvoices').subscribe(fieldState => {
const params = getParams(fieldState.value); const params = getParams(fieldState.value);
linkage.componentProps('relevanceInvoicesId', params); linkage.componentProps('relevanceInvoicesId', params);
}); });
// 关联单据改变
onFieldValueChange$('relevanceInvoicesId').subscribe(fieldState => { onFieldValueChange$('relevanceInvoicesId').subscribe(fieldState => {
console.log('fieldState.value', fieldState.value)
const relevanceInvoicesVal = getFieldValue('relevanceInvoices'); const relevanceInvoicesVal = getFieldValue('relevanceInvoices');
const first = fieldState.value[0]; const first = fieldState.value && fieldState.value[0];
if (!first) { if (!first) {
return; return;
...@@ -247,6 +324,22 @@ export const useBusinessEffects = (context, actions) => { ...@@ -247,6 +324,22 @@ export const useBusinessEffects = (context, actions) => {
setFieldValue('memberName', first.supplyMembersName); setFieldValue('memberName', first.supplyMembersName);
setFieldValue('address', '暂无收货地址'); setFieldValue('address', '暂无收货地址');
setFieldValue('transport', '暂无物流方式'); setFieldValue('transport', '暂无物流方式');
// 根据选择的订单查询 订单对应的商品,并给 Table 的商品下拉框赋值
PublicApi.getOrderProcurementOrderProductList({
id: first.id,
}).then(res => {
if (res.code === 1000) {
const goodOptions = res.data.map(item => ({
label: `${item.productId}/${item.productName}/¥${item.price}`,
value: item.id,
}));
setFieldState('applyMember.*.good', state => {
FormPath.setIn(state, 'originAsyncData', res.data);
FormPath.setIn(state, 'props.enum', goodOptions);
});
}
});
break; break;
} }
...@@ -278,4 +371,31 @@ export const useBusinessEffects = (context, actions) => { ...@@ -278,4 +371,31 @@ export const useBusinessEffects = (context, actions) => {
break; break;
} }
}); });
// 关联明细 商品下拉框 联动商品ID、单价
onFieldInputChange$('applyMember.*.good').subscribe(fieldState => {
const { name, originAsyncData, value } = fieldState;
const current = originAsyncData.find(item => item.id === value);
if (!current) {
return;
}
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `applyMember.${$1}.goodId`
}),
state => {
state.value = current.productId;
}
);
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `applyMember.${$1}.price`
}),
state => {
state.value = `¥${current.price}`;
}
);
});
} }
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { usePageStatus } from '@/hooks/usePageStatus'; import { Button, Card, message } from 'antd';
import { Radio, ArrayTable } from '@formily/antd-components';
import { history } from 'umi'; import { history } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined, PlusOutlined } from '@ant-design/icons'; import { SaveOutlined, PlusOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks } from '@formily/antd';
import { Button, Card } from 'antd'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { getBillsDetailSchema, orderBillSchema } from './schema'; import ModalTable from '@/components/ModalTable';
import Search from '@/components/NiceForm/components/Search';
import Submit from '@/components/NiceForm/components/Submit';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { getBillsDetailSchema, goodsSearchSchema } from './schema';
import { createEffects } from './effects'; import { createEffects } from './effects';
const addSchemaAction = createFormActions(); const addSchemaAction = createFormActions();
...@@ -24,6 +33,9 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -24,6 +33,9 @@ const AddBills: React.FC<{}> = (props: any) => {
const [modalColumns, setModalColumns] = useState([]); const [modalColumns, setModalColumns] = useState([]);
const [visible, setVisible] = useState(false);
const [productRowSelection, productRowCtl] = useRowSelectionTable({ type: 'checkbox' });
const tableColumns = [ const tableColumns = [
{ dataIndex: 'id', title: 'ID' }, { dataIndex: 'id', title: 'ID' },
{ {
...@@ -51,8 +63,67 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -51,8 +63,67 @@ const AddBills: React.FC<{}> = (props: any) => {
}, },
]; ];
const goodsColumns: any[] = [
{
title: '货号',
dataIndex: 'id',
align: 'center',
render: (_, record) => record.code,
},
{
title: '货品名称',
dataIndex: 'name',
align: 'center',
},
{
title: '规格型号',
dataIndex: 'type',
align: 'center',
},
{
title: '品类',
dataIndex: ['customerCategory', 'name'],
align: 'center',
},
{
title: '品牌',
dataIndex: ['brand', 'name'],
align: 'center',
},
]
// 获取品牌
const fetchBrand = async () => {
const res = await PublicApi.getProductSelectGetSelectBrand({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 获取会员品类
const fetchCustomerCategory = async () => {
const res = await PublicApi.getProductSelectGetSelectCustomerCategory({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 弹出单据明细 // 弹出单据明细
const handleAddMemberBtn = () => {}; const handleAdd = () => {
const relevanceInvoicesIdVal = addSchemaAction.getFieldValue('relevanceInvoicesId');
console.log('relevanceInvoicesIdVal', relevanceInvoicesIdVal);
if (!relevanceInvoicesIdVal) {
message.warning('请选择对应单据');
return;
}
setVisible(true);
};
// 删除选中单据明细 // 删除选中单据明细
const handleDeleteTable = id => {}; const handleDeleteTable = id => {};
...@@ -62,7 +133,7 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -62,7 +133,7 @@ const AddBills: React.FC<{}> = (props: any) => {
style={{ marginBottom: 16 }} style={{ marginBottom: 16 }}
block block
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={handleAddMemberBtn} onClick={handleAdd}
type="dashed" type="dashed"
> >
添加单据明细 添加单据明细
...@@ -87,6 +158,37 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -87,6 +158,37 @@ const AddBills: React.FC<{}> = (props: any) => {
}); });
}; };
// 选择单据明细
const handleOkAddProduct = async () => {
console.log('productRowCtl.selectRow', productRowCtl.selectRow)
const values = productRowCtl.selectRow.map(item => ({
code: item.code,
name: item.name,
type: item.type,
category: item.customerCategory.name,
brand: item.brand.name,
unitName: item.unitName,
costPrice: `¥${item.costPrice}`,
good: undefined,
goodId: '',
price: '',
quantity: '',
amount: '',
}));
addSchemaAction.setFieldValue('applyMember', values);
setVisible(false);
}
const fetchProductList = async (params) => {
const res = await PublicApi.getProductGoodsGetGoodsList({
...params,
})
if (res.code === 1000) {
return res.data
}
return [];
}
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => history.goBack()}
...@@ -119,6 +221,10 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -119,6 +221,10 @@ const AddBills: React.FC<{}> = (props: any) => {
tableColumns, tableColumns,
tableAddButton, tableAddButton,
}} }}
components={{
RadioGroup: Radio.Group,
ArrayTable,
}}
effects={($, actions) => createEffects($, actions)} effects={($, actions) => createEffects($, actions)}
onSubmit={handleSubmit} onSubmit={handleSubmit}
actions={addSchemaAction} actions={addSchemaAction}
...@@ -128,6 +234,41 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -128,6 +234,41 @@ const AddBills: React.FC<{}> = (props: any) => {
})} })}
/> />
</Card> </Card>
<ModalTable
modalTitle='选择货品'
confirm={handleOkAddProduct}
cancel={() => setVisible(false)}
visible={visible}
columns={goodsColumns}
rowSelection={productRowSelection}
fetchTableData={params => fetchProductList(params)}
formilyProps={
{
ctx: {
schema: goodsSearchSchema,
components: {
Search,
Submit,
} ,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncSelect('brandId', fetchBrand, ['name', 'id']);
useAsyncSelect('customerCategoryId', fetchCustomerCategory, ['name', 'id']);
},
inline: false,
}
}
}
tableProps={{
rowKey: 'id',
}}
/>
</PageHeaderWrapper> </PageHeaderWrapper>
); );
}; };
......
...@@ -273,17 +273,41 @@ export const getBillsDetailSchema = params => { ...@@ -273,17 +273,41 @@ export const getBillsDetailSchema = params => {
required: true, required: true,
}, },
relevanceInvoices: { relevanceInvoices: {
type: 'radio',
title: '对应单据', title: '对应单据',
type: 'string',
'x-rules': [
{
required: true, required: true,
message: '请选择对应单据',
},
],
enum: [ enum: [
{ label: '订单', value: DEPENDENT_DOC_ORDER }, {
{ label: '换货申请单', value: DEPENDENT_DOC_EXCHANGE }, label: '订单',
{ label: '退货申请单', value: DEPENDENT_DOC_RETURN }, value: DEPENDENT_DOC_ORDER,
{ label: '生产通知单', value: DEPENDENT_DOC_PRODUCTION }, disabled: true,
{ label: '内部单据', value: DEPENDENT_DOC_INTERNAL }, },
{
label: '换货申请单',
value: DEPENDENT_DOC_EXCHANGE,
disabled: true,
},
{
label: '退货申请单',
value: DEPENDENT_DOC_RETURN,
disabled: true,
},
{
label: '生产通知单',
value: DEPENDENT_DOC_PRODUCTION,
disabled: true,
},
{
label: '内部单据',
value: DEPENDENT_DOC_INTERNAL,
disabled: true,
},
], ],
default: 1,
}, },
// 这是用 Mega-Layout 设置独立作用域,不然会被 Form 的布局影响到弹窗的布局 // 这是用 Mega-Layout 设置独立作用域,不然会被 Form 的布局影响到弹窗的布局
MEGA_LAYOUT1_1: { MEGA_LAYOUT1_1: {
...@@ -299,6 +323,7 @@ export const getBillsDetailSchema = params => { ...@@ -299,6 +323,7 @@ export const getBillsDetailSchema = params => {
'x-component': 'CustomRelevance', 'x-component': 'CustomRelevance',
'x-component-props': { 'x-component-props': {
title: '关联', title: '关联',
tip: '请选择对应单据',
}, },
'x-mega-props': { 'x-mega-props': {
wrapperCol: 12, wrapperCol: 12,
...@@ -349,18 +374,89 @@ export const getBillsDetailSchema = params => { ...@@ -349,18 +374,89 @@ export const getBillsDetailSchema = params => {
labelAlign: 'left', labelAlign: 'left',
}, },
properties: { properties: {
addBtn: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{tableAddButton}}'
},
},
applyMember: { applyMember: {
type: 'array:number', type: 'array',
'x-component': 'MultTable', 'x-component': 'ArrayTable',
'x-component-props': { 'x-component-props': {
rowKey: 'memberId', renderAddition: () => null,
columns: '{{tableColumns}}', },
prefix: '{{tableAddButton}}', items: {
type: 'object',
properties: {
code: {
type: 'string',
title: '货号',
'x-component': 'Text',
},
name: {
type: 'string',
title: '货品名称',
'x-component': 'Text',
},
type: {
type: 'string',
title: '规格型号',
'x-component': 'Text',
},
category: {
type: 'string',
title: '品类',
'x-component': 'Text',
},
brand: {
type: 'string',
title: '品牌',
'x-component': 'Text',
},
unitName: {
type: 'string',
title: '单位',
'x-component': 'Text',
},
costPrice: {
type: 'string',
title: '成本价',
'x-component': 'Text',
},
good: {
type: 'string',
title: '商品名称',
enum: [],
'x-component-props': {
allowClear: true,
},
},
goodId: {
type: 'string',
title: '商品ID',
'x-component': 'Text',
},
price: {
type: 'string',
title: '单价',
'x-component': 'Text',
},
quantity: {
type: 'string',
title: '单据数量',
'x-component-props': {
allowClear: true,
},
},
amount: {
type: 'string',
title: '金额',
'x-component': 'Text',
}, },
default: [ },
{ id: 1, name: '名称', type: '类型' }, }
{ id: 2, name: '名称1', type: '类型1' },
],
}, },
}, },
}, },
...@@ -460,3 +556,75 @@ export const orderBillSchema: ISchema = { ...@@ -460,3 +556,75 @@ export const orderBillSchema: ISchema = {
}, },
}, },
}; };
export const goodsSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'Mega-Layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: '搜索',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 3,
},
properties: {
code: {
type: 'string',
'x-component-props': {
placeholder: '货号',
allowClear: true,
},
},
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '规格型号',
allowClear: true,
},
},
customerCategoryId: {
type: 'string',
'x-component-props': {
placeholder: '品类',
allowClear: true,
},
},
brandId: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '品牌',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
}
}
},
},
},
},
},
}
\ No newline at end of file
...@@ -63,6 +63,7 @@ const billsType: React.FC<{}> = () => { ...@@ -63,6 +63,7 @@ const billsType: React.FC<{}> = () => {
sorter: (a, b) => a.state - b.state, sorter: (a, b) => a.state - b.state,
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<StatusSwitch <StatusSwitch
fieldNames="state"
handleConfirm={() => handleModify(record)} handleConfirm={() => handleModify(record)}
record={record} record={record}
/> />
......
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