Commit a29268a3 authored by youjie's avatar youjie

优化取消

parent 38c92598
......@@ -223,38 +223,49 @@
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)
wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
uni.showLoading({
title: "请稍等片刻...",
})
that.DataLists[that.i].loading = true
that.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()
that.DataLists[that.i].loading = false
},
(err) => {
uni.hideLoading()
that.DataLists[that.i].loading = false
}
);
}else {
this.DataLists[this.i].loading = false
uni.hideLoading()
}
}
uni.hideLoading()
this.DataLists[this.i].loading = false
},
(err) => {
uni.hideLoading()
this.DataLists[this.i].loading = false
}
);
})
}
},
getDetail(orderId,s){
......
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