Commit 4e6619c6 by chenxu

金额过大布局问题

单笔限额 两百万
parent 6623c3c6
......@@ -497,6 +497,8 @@ const CounterMixins = ComposeComponent => {
Toast.info('商品价格的小数点只能输入两位', 2);
} else if (Number(NP.round(price, 2).toFixed(2)) <= 0) {
Toast.info('商品价格必须要大于0', 2);
} else if (Number(NP.round(price, 2).toFixed(2)) > 2000000) {
Toast.info('商品价格不能大于2000000', 2);
} else {
const {goodsArr} = this.state;
const good = {
......
......@@ -289,7 +289,7 @@ class VerticalPage extends Component {
<View style={styles.ThStyle}>
<Text style={styles.ThText}>数量</Text>
</View>
<View style={styles.ThStyle}>
<View style={styles.ThStyleMoney}>
<Text style={styles.ThText}>金额</Text>
</View>
</View>
......@@ -403,7 +403,7 @@ class VerticalPage extends Component {
<View />
)}
</View>
<View style={styles.TdStyle}>
<View style={styles.TdStyleMoney}>
{item.price ? (
<Text style={styles.TdText}>
{NP.round(item.price * item.num, 2).toFixed(2)}
......@@ -413,17 +413,21 @@ class VerticalPage extends Component {
{NP.round(item.prePrice * item.num, 2).toFixed(2)}
</Text>
)}
<View style={styles.iconStyle}>
<Icon
style={{marginLeft: 10}}
style={{marginLeft: 0}}
name="ios-close-circle"
size={35}
color={colors.bg}
onPress={() =>
this.props.removeIndex(index + (this.props.current - 1) * pageSize)
this.props.removeIndex(
index + (this.props.current - 1) * pageSize,
)
}
/>
</View>
</View>
</View>
);
render() {
......@@ -1127,7 +1131,7 @@ const styles = {
flexDirection: 'row',
},
firstThStyle: {
width: '40%',
width: '33%',
alignItems: 'flex-start',
justifyContent: 'center',
paddingTop: width > 801 ? 18 : scaleHeight(30),
......@@ -1144,6 +1148,15 @@ const styles = {
paddingLeft: width > 801 ? 10 : scaleSize(20),
paddingRight: width > 801 ? 10 : scaleSize(20),
},
ThStyleMoney: {
width: '27%',
alignItems: 'center',
justifyContent: 'center',
paddingTop: width > 801 ? 18 : scaleHeight(30),
paddingBottom: width > 801 ? 18 : scaleHeight(30),
paddingLeft: width > 801 ? 10 : scaleSize(20),
paddingRight: width > 801 ? 10 : scaleSize(20),
},
ThText: {
fontSize: setSpText(40),
},
......@@ -1156,7 +1169,7 @@ const styles = {
backgroundColor: '#F0F0F0',
},
firstTdStyle: {
width: '40%',
width: '33%',
alignItems: 'flex-start',
justifyContent: 'center',
paddingTop: width > 801 ? 18 : scaleHeight(30),
......@@ -1174,6 +1187,21 @@ const styles = {
paddingLeft: width > 801 ? 10 : scaleSize(20),
paddingRight: width > 801 ? 10 : scaleSize(20),
},
TdStyleMoney: {
flexDirection: 'row',
width: '27%',
alignItems: 'center',
justifyContent: 'center',
paddingTop: width > 801 ? 18 : scaleHeight(30),
paddingBottom: width > 801 ? 18 : scaleHeight(30),
paddingLeft: width > 801 ? 10 : scaleSize(20),
paddingRight: width > 801 ? 10 : scaleSize(20),
position: 'relative',
},
iconStyle: {
position: 'absolute',
right: 0,
},
TdText: {
fontSize: width > 801 ? 25 : setSpText(30),
},
......
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