Commit 4e6619c6 by chenxu

金额过大布局问题

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