mirror of
https://gitee.com/ShopeX/ECShopX_Store-Operations-tools-frontend
synced 2026-08-04 20:16:22 +08:00
v4.5.0
This commit is contained in:
@@ -23,8 +23,8 @@ class OrderRadio extends PureComponent {
|
||||
})
|
||||
}
|
||||
|
||||
componentDidUpdate(_, prevState) {
|
||||
if (this.props.active !== prevState.active) {
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.active !== prevProps.active) {
|
||||
this.setState({
|
||||
active: this.props.active
|
||||
})
|
||||
|
||||
@@ -117,6 +117,7 @@ export default class OrderDeal extends PureComponent {
|
||||
address_id: return_address_id
|
||||
} = await api.address.detail({ address_id: selectAddressId })
|
||||
|
||||
// 勿在异步回调里写 isApprove: !!address_id:无 address_id 时为 false,会覆盖用户已点的「同意」
|
||||
this.setState({
|
||||
selectAddress: {
|
||||
mobile,
|
||||
@@ -124,7 +125,7 @@ export default class OrderDeal extends PureComponent {
|
||||
address: `${regions.replace(/[(\"|\[|\]|\,|')]/g, '')} ${address}`,
|
||||
id: return_address_id
|
||||
},
|
||||
isApprove: !!router?.params?.address_id
|
||||
...(router?.params?.address_id ? { isApprove: true } : {})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ $filterHeight:100px;
|
||||
&.show-buttonsaction{
|
||||
transform: none;
|
||||
position: fixed;
|
||||
> div, > view {
|
||||
transform: none;
|
||||
-webkit-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,13 +245,35 @@ export default class List extends PureComponent {
|
||||
Taro.navigateTo({ url: `/pages/order/detail?order_id=${goodInfo.order_id}` })
|
||||
}
|
||||
|
||||
//点击操作按钮
|
||||
handleClickActionButtons = (e) => {
|
||||
console.log('handleClickActionButtons')
|
||||
|
||||
// 与 pages/order/list 一致:cancel / aftersales / payment / markdown 在 PageActionButtons 内无分支,必须由 onClick 处理
|
||||
handleClickActionButtons = (orderItem, type) => {
|
||||
const { order_id } = orderItem
|
||||
this.setState({
|
||||
buttonsActionVisible: true
|
||||
})
|
||||
console.log('handleClickActionButtons', type)
|
||||
|
||||
if (type === 'cancel') {
|
||||
wx.miniProgram.navigateTo({
|
||||
url: `/subpages/dianwu/trade/cancel-trade?trade_id=${order_id}`
|
||||
})
|
||||
return
|
||||
}
|
||||
if (type === 'aftersales') {
|
||||
wx.miniProgram.navigateTo({
|
||||
url: `/subpages/dianwu/trade/sale-after?trade_id=${order_id}`
|
||||
})
|
||||
return
|
||||
}
|
||||
if (type === 'payment') {
|
||||
this.handleClickGoodItem({ order_id })
|
||||
return
|
||||
}
|
||||
if (type === 'markdown') {
|
||||
wx.miniProgram.navigateTo({
|
||||
url: `/subpages/dianwu/trade/change-price?trade_id=${order_id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//关闭操作弹框
|
||||
@@ -320,7 +342,7 @@ export default class List extends PureComponent {
|
||||
<PageActionButtons
|
||||
buttons={orderItem?.app_info?.buttons}
|
||||
pageType={pageType}
|
||||
onClick={this.handleClickActionButtons}
|
||||
onClick={this.handleClickActionButtons.bind(this, orderItem)}
|
||||
onClose={this.handleCloseActionButtons}
|
||||
orderInfo={orderItem}
|
||||
mainStatus={mainStatus}
|
||||
|
||||
@@ -26,11 +26,14 @@ $filterHeight:100px;
|
||||
}
|
||||
|
||||
|
||||
// 与 pages/order/list 一致:不用 page-scroll(其 transform 会让列表内 fixed 弹层错位/不显示)
|
||||
&-orderList {
|
||||
@include page-scroll($searchInputHeight+$tabbarHeight+$filterHeight+20, 0);
|
||||
z-index:100;
|
||||
// @include page-scroll($searchInputHeight+$tabbarHeight+$filterHeight+20, 0);
|
||||
overflow: auto;
|
||||
height: calc(100vh - 310px);
|
||||
z-index: 100;
|
||||
|
||||
&.show-buttonsaction{
|
||||
&.show-buttonsaction {
|
||||
transform: none;
|
||||
-webkit-transform: none;
|
||||
-moz-transform: none;
|
||||
|
||||
Reference in New Issue
Block a user