Commit f94d3062 authored by 武广's avatar 武广

fix: 修改库存格式化问题

parent 8f5d7a8a
import React from 'react';
import { Select, Form, InputNumber, Input, Button, Popover } from 'antd';
import commonStyle from '../common.less';
import { debounce } from '@/utils/utils';
export const WrapperContainer = props => (
<div className={commonStyle.container}>{props.children}</div>
......@@ -78,7 +77,6 @@ export const CreateFormInput = props => {
type,
batchProps,
disabeldRender,
onChange,
...options
} = props;
......@@ -89,11 +87,7 @@ export const CreateFormInput = props => {
{...options}
style={{ width: '100%' }}
placeholder={`请输入${title}`}
// onBlur={e => onBlurEvent(e.target.value, dataIndex, rowIndex)}
onChange={e => {
onChange(e);
onBlurEvent(e.target.value, dataIndex, rowIndex);
}}
onBlur={e => onBlurEvent(e.target.value, dataIndex, rowIndex)}
/>
);
}
......@@ -136,22 +130,18 @@ export const CreateFormInput = props => {
</>
);
}
// console.log('options :>> ', options);
return (
<InputNumber
{...roleProps}
{...options}
style={{ width: '100%' }}
placeholder={`请输入${title}`}
// onBlur={e => {
// const v = e.target.value;
// console.log('v :>> ', v);
// onBlurEvent(+e.target.value || 0, dataIndex, rowIndex);
// }}
onChange={debounce(e => {
onChange(e);
onBlurEvent(e, dataIndex, rowIndex);
}, 300)}
onBlur={e => {
const inputTarget = e.target;
setTimeout(() => {
onBlurEvent(inputTarget.value, dataIndex, rowIndex);
}, 10);
}}
/>
);
};
......@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
},
......@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
roleRules: { required: false },
roleProps: {
min: 0,
// max: 100,
},
// batchProps: {
// min: 0,
// },
},
{
title: '市场价',
......@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
},
......@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
disabeldRender: () => customer.isDisabled,
},
{
......@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
},
roleProps: {
min: 0,
step: 1,
precision: 0,
},
roleRules: { required: true },
disabeldRender: record => {
......@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
precision: 0,
maxLength: 5,
},
batchProps: {
min: 0,
precision: 0,
maxLength: 5,
},
disabeldRender: () => customer.isDisabled,
},
{
......
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