Commit a29268a3 authored by youjie's avatar youjie

优化取消

parent 38c92598
...@@ -223,38 +223,49 @@ ...@@ -223,38 +223,49 @@
if(this.DataLists[this.i].loading){ if(this.DataLists[this.i].loading){
return return
} }
//未付款-调用后台取消
uni.showLoading({
title: "请稍等片刻...",
})
this.DataLists[this.i].loading = true
if ( if (
(item.paymentTime == null || item.paymentTime == "") && (item.paymentTime == null || item.paymentTime == "") &&
(item.orderState == 1||item.orderState == 2) (item.orderState == 1||item.orderState == 2)
) { ) {
this.apipost( wx.showModal({
"GetCancelOrder_post", title: '提示',
{ content: '确定取消订单?',
OrderNo: '', success: (tip) => {
ErpOrderId: item.orderId, if (tip.confirm) {
OrderTypeStr: 'DMC', uni.showLoading({
}, title: "请稍等片刻...",
(res) => { })
if (res.resultCode == 1) { that.DataLists[that.i].loading = true
uni.showToast({ that.apipost(
title: "操作成功", "GetCancelOrder_post",
icon: "success", {
}); OrderNo: '',
that.$emit('research',that.dataMsg.orderState) 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){ 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