Commit b536f4c8 authored by youjie's avatar youjie

机票

parent 8b6ff7a8
......@@ -62,10 +62,23 @@
<text class="fz32">¥ </text>
{{item.preferPrice}}
</view>
<!-- #ifdef MP-DI -->
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="cancelOrderZK(item,i)">取 消</view>
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="getDetail(item.orderId,item.orderState)">立即支付</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="cancelOrder(item,i)">取 消</view>
<!-- #endif -->
</view>
</view>
<view class="row-w">
......@@ -204,6 +217,46 @@
);
}
},
cancelOrderZK(item,i){
let that = this
this.i = i
if(this.DataLists[this.i].loading){
return
}
//未付款-调用后台取消
uni.showLoading({
title: "请稍等片刻...",
})
this.DataLists[this.i].loading = true
if (
(item.paymentTime == null || item.paymentTime == "") &&
(item.orderState == 1||item.orderState == 2)
) {
this.apipost(
"GetCancelOrder_post",
{
OrderNo: '',
ErpOrderId: item.orderId,
OrderTypeStr: 'DMC',
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.$emit('research',that.dataMsg.orderState)
}
uni.hideLoading()
this.DataLists[this.i].loading = false
},
(err) => {
uni.hideLoading()
this.DataLists[this.i].loading = false
}
);
}
},
getDetail(orderId,s){
const status = s==1?1:(s==4?2:0)
// #ifdef MP-DI
......
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