Merge branch 'wwz' of gitee.com:shaanxi-super-shopkeeper_1/cashierdesktop into gyq

This commit is contained in:
gyq 2024-03-16 10:09:41 +08:00
commit 426e1d59a9
2 changed files with 16 additions and 7 deletions

View File

@ -2,7 +2,7 @@
<div class="demo_tabs_box"> <div class="demo_tabs_box">
<div class="demo_tabs_boxitem" v-for="(item, index) in ordereData.list" :key="index" <div class="demo_tabs_boxitem" v-for="(item, index) in ordereData.list" :key="index"
@click="clickitemboxshow(item)"> @click="clickitemboxshow(item)">
<div class="demo_tabs_boxitem_oneyt" v-if="item.status == 'refund'">已退款</div> <!-- <div class="demo_tabs_boxitem_oneyt" v-if="item.status == 'refund'">已退款</div> -->
<div class="demo_tabs_boxitem_one"> <div class="demo_tabs_boxitem_one">
<div class="" <div class=""
@ -32,8 +32,8 @@
</div> </div>
<div style="color:#ff9e01;"> <div style="color:#ff9e01;">
<span v-if="item.status == 'pending'">挂单</span> <span v-if="item.status == 'pending'">挂单</span>
<span v-if="item.status == 'refund'">退单</span> <span style="color: red;" v-if="item.status == 'refund'">退单</span>
<span v-if="item.status == 'closed'">订单完成</span> <span style="color:#21c36b;" v-if="item.status == 'closed'">订单完成</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -69,8 +69,8 @@
</div> </div>
<div class="orderbox_right_top" style="margin-top: 20px; border-bottom: 2px solid #ccc;"> <div class="orderbox_right_top" style="margin-top: 20px; border-bottom: 2px solid #ccc;">
<span style="font-size: 16px;" v-if="orderDetaildata.status == 'pending'">挂单</span> <span style="font-size: 16px;" v-if="orderDetaildata.status == 'pending'">挂单</span>
<span style="font-size: 16px;" v-if="orderDetaildata.status == 'refund'">退单</span> <span style="font-size: 16px; color: red;" v-if="orderDetaildata.status == 'refund'">退单</span>
<span style="font-size: 16px;" v-if="orderDetaildata.status == 'closed'">订单完成</span> <span style="font-size: 16px; color:#21c36b;" v-if="orderDetaildata.status == 'closed'">订单完成</span>
</div> </div>
<div class="orderbox_right_top" style="margin-top: 20px;"> <div class="orderbox_right_top" style="margin-top: 20px;">
<span>商品明细</span> <span>商品明细</span>
@ -204,8 +204,11 @@
<div class="recharge_footer_itemright_botton_boxonetext">{{ refundamount }}</div> <div class="recharge_footer_itemright_botton_boxonetext">{{ refundamount }}</div>
</div> </div>
<div class="recharge_footer_itemright_botton_boxtow"> <div class="recharge_footer_itemright_botton_boxtow">
<el-button type="primary" style="width: 100%; height: 100%;" <el-button type="primary" style="width: 100%; height: 100%;" :loading="buttonloading"
@click="payreturnOrderclick">支付退回</el-button> @click="payreturnOrderclick">
<span v-if="!buttonloading">支付退回</span>
<span v-else>支付退回...</span>
</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -236,7 +239,10 @@ const handlerecharge = () => { //退单切换
recharge.value = !recharge.value recharge.value = !recharge.value
} }
const buttonloading = ref() //loading
const payreturnOrderclick = async () => { const payreturnOrderclick = async () => {
buttonloading.value = true
if (refundamount.value == 0) { if (refundamount.value == 0) {
ElMessage.error('退款金额不能为0') ElMessage.error('退款金额不能为0')
return false return false
@ -259,12 +265,15 @@ const payreturnOrderclick = async () => {
itemboxshow.value = false itemboxshow.value = false
refundamount.value = 0 refundamount.value = 0
ElMessage.success('退款成功!') ElMessage.success('退款成功!')
buttonloading.value = false
asyncorderfindOrder() asyncorderfindOrder()
} else { } else {
buttonloading.value = false
ElMessage.error('以没有退款项目!') ElMessage.error('以没有退款项目!')
} }
} catch (error) { } catch (error) {
buttonloading.value = false
} }