Commit 615bb31b by 姜雷

修改订单详情样式

parent bb546863
...@@ -118,6 +118,7 @@ class OrderDetail extends Component { ...@@ -118,6 +118,7 @@ class OrderDetail extends Component {
equipmentNum, equipmentNum,
equipmentPosition, equipmentPosition,
deductionMoney, deductionMoney,
thirdDiscountMoney,
} = this.state; } = this.state;
const payTypeName = getPayType(payType); const payTypeName = getPayType(payType);
return ( return (
...@@ -140,7 +141,7 @@ class OrderDetail extends Component { ...@@ -140,7 +141,7 @@ class OrderDetail extends Component {
</View> </View>
{deductionBean ? ( {deductionBean ? (
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
<Text>通用豆抵扣</Text> <Text>{serviceName}豆抵扣</Text>
<Text className='deduction'>{deductionBean.toFixed(2)}</Text> <Text className='deduction'>{deductionBean.toFixed(2)}</Text>
</View> </View>
) : null} ) : null}
...@@ -150,6 +151,12 @@ class OrderDetail extends Component { ...@@ -150,6 +151,12 @@ class OrderDetail extends Component {
<Text className='deduction'>{deductionMoney.toFixed(2)}</Text> <Text className='deduction'>{deductionMoney.toFixed(2)}</Text>
</View> </View>
) : null} ) : null}
{thirdDiscountMoney ? (
<View className='OrderDetail-payinfo'>
<Text>三方抵扣</Text>
<Text className='deduction'>{thirdDiscountMoney.toFixed(2)}</Text>
</View>
) : null}
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
<Text>支付方式</Text> <Text>支付方式</Text>
......
...@@ -32,8 +32,13 @@ type PageOwnProps = {}; ...@@ -32,8 +32,13 @@ type PageOwnProps = {};
type PageProps = PageStateProps & PageDispatchProps & PageOwnProps; type PageProps = PageStateProps & PageDispatchProps & PageOwnProps;
type PageState = {
needRefresh: boolean;
};
interface OrderList { interface OrderList {
props: PageProps; props: PageProps;
state: PageState;
} }
@connect( @connect(
...@@ -60,15 +65,22 @@ class OrderList extends Component { ...@@ -60,15 +65,22 @@ class OrderList extends Component {
}; };
constructor(props: PageProps) { constructor(props: PageProps) {
super(props); super(props);
this.state = {
needRefresh: false,
};
} }
componentWillMount() { componentWillMount() {
this.getPayOrderHandle(); this.getPayOrderHandle();
this.getAllOrderHandle();
} }
componentDidShow() { componentDidShow() {
const { needRefresh } = this.state;
if (needRefresh) {
this.getPayOrderHandle(); this.getPayOrderHandle();
this.getAllOrderHandle(); this.getAllOrderHandle();
} }
}
onPullDownRefresh() { onPullDownRefresh() {
console.log('in onPullDownRefresh'); console.log('in onPullDownRefresh');
...@@ -132,12 +144,18 @@ class OrderList extends Component { ...@@ -132,12 +144,18 @@ class OrderList extends Component {
} }
goPayPage(data) { goPayPage(data) {
this.setState({
needRefresh: true,
});
this.$preload({ id: data.id }); this.$preload({ id: data.id });
Taro.navigateTo({ Taro.navigateTo({
url: '/pages/Order/OrderPay/OrderPay', url: '/pages/Order/OrderPay/OrderPay',
}); });
} }
goDetail(data) { goDetail(data) {
this.setState({
needRefresh: false,
});
this.$preload(data); this.$preload(data);
Taro.navigateTo({ Taro.navigateTo({
url: '/pages/Order/OrderDetail/OrderDetail', url: '/pages/Order/OrderDetail/OrderDetail',
......
.OrderDetail-info { .OrderDetail-info {
display: flex; display: flex;
height: 60px;
line-height: 60px; line-height: 60px;
justify-content: space-between; justify-content: space-between;
font-size: 28px; font-size: 28px;
...@@ -11,8 +10,5 @@ ...@@ -11,8 +10,5 @@
.OrderDetail-info-content { .OrderDetail-info-content {
text-align: right; text-align: right;
flex: 1; flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
} }
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