Commit 5eb48def authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix

parent d441a906
......@@ -134,7 +134,7 @@ const AddGoods = () => {
message: '请填入货号'
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*-_])[\da-zA-Z~!@#$%^&*-_]{1,20}$/,
pattern: /^(?=.*\d)(?=.*[a-z_A-Z])(?=.*[~!@#$%^&*-_])[\da-zA-Z~!@#$%^&*-_]{1,20}$/,
message: '最长20个字符(由字母、数组、特殊字符组成)'
}
]}
......@@ -260,6 +260,10 @@ const AddGoods = () => {
{
required: true,
message: '请填入成本价',
},
{
pattern: /^\d+(\.\d{1,4})?$/,
message: '小数点后仅限四位',
}
]}
>
......
This diff is collapsed.
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const goodsSchema: ISchema = {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '货品名称',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
},
colStyle: {
marginLeft: 20,
},
},
properties: {
code: {
type: 'string',
'x-component-props': {
placeholder: '货号'
},
},
brandId: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '品牌',
showSearch: true,
showArrow: true,
filterOption: false,
defaultActiveFirstOption: false,
notFoundContent: false,
style: { width: '100%' },
},
},
customerCategoryId: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '品类',
style: { width: '100%' }
},
},
batch: {
type: 'string',
'x-component-props': {
placeholder: '导入批次'
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -300,29 +300,29 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
<Tooltip title="设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市">
<QuestionCircleOutlined />
</Tooltip>
<i style={{ color: 'red' }}> * </i>
</span>
}
rules={[
{
required: true,
message: '请选择地区'
}
]}
// rules={[
// {
// required: true,
// message: '请选择地区'
// }
// ]}
key={field.key}
>
<Form.Item
{...field}
rules={[
{
required: true,
message: "请选择地区",
},
]}
// rules={[
// {
// required: true,
// message: "请选择地区",
// },
// ]}
noStyle
>
<Cascader
options={proviceOptions}
changeOnSelect
onChange={onCommodityAreaChange}
placeholder="请选择地区"
fieldNames={{ label: 'name', value: 'code', children: 'areaResponses' }}
......
......@@ -37,8 +37,8 @@ interface paramItem {
name: string;
code: string;
priceType: number;
Min: number;
Max: number;
min: number;
max: number;
brandId: number;
customerCategoryId: number;
status: number;
......@@ -65,8 +65,8 @@ const Products: React.FC<{}> = () => {
name: '',
code: '',
priceType: null,
Min: null,
Max: null,
min: null,
max: null,
brandId: 0,
customerCategoryId: 0,
status: null,
......@@ -478,7 +478,7 @@ const Products: React.FC<{}> = () => {
}
const handleReset = () => {
let restObj = { name: '', code: '', Max: null, Min: null, priceType: null, brandId: 0, customerCategoryId: 0, status: null }
let restObj = { name: '', code: '', max: null, min: null, priceType: null, brandId: 0, customerCategoryId: 0, status: null }
setFilterParams(restObj)
setBrandValue(undefined)
setClassValue(undefined)
......@@ -650,11 +650,11 @@ const Products: React.FC<{}> = () => {
<Input.Group compact>
<Input
type="number"
value={filterParams.Min}
value={filterParams.min}
style={{ width: '40%', textAlign: 'center' }}
min={0}
placeholder="最低价格"
onChange={(e)=>setFilterParams({...filterParams, Min: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, min: +e.target.value})}
/>
<Input
style={{
......@@ -670,7 +670,7 @@ const Products: React.FC<{}> = () => {
/>
<Input
type="number"
value={filterParams.Max}
value={filterParams.max}
style={{
width: '40%',
textAlign: 'center',
......@@ -678,7 +678,7 @@ const Products: React.FC<{}> = () => {
}}
min={0}
placeholder="最高价格"
onChange={(e)=>setFilterParams({...filterParams, Max: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, max: +e.target.value})}
/>
</Input.Group>
</Col>
......
......@@ -33,6 +33,8 @@ const viewBrand: React.FC<{}> = () => {
setFixStep(0)
else if(res.data.status===2)
setFixStep(1)
else
setFixStep(2)
}
})
PublicApi.getProductBrandGetBrandCheckRecord({brandId: id}).then(res=> {
......@@ -126,7 +128,7 @@ const viewBrand: React.FC<{}> = () => {
}
const tips = <>证明材料<Tooltip title="证明材料:如商标注册证书、品牌授权证书等证明材料"><span>&nbsp;<QuestionCircleOutlined /></span></Tooltip></>
const content = <>
<Descriptions colon={true} style={{textAlign: 'center'}}>
<Descriptions colon={true} style={{textAlign: 'center', marginLeft: 100, width: 800}}>
<Descriptions.Item label="申请审核时间">{brandInfo.applyTime && moment(brandInfo.applyTime).format('YYYY-MM-DD HH:mm:ss')}</Descriptions.Item>
<Descriptions.Item label="审核状态">
{
......
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