|
|
@@ -180,7 +180,8 @@
|
|
|
<view class="flex-center"> </view>
|
|
|
<view class="operate-btn-wrap">
|
|
|
<button class="admin-button-com middle" @click.stop="cancelFn(orderInfo)" v-if="orderInfo.status == 1">取消</button>
|
|
|
- <button class="admin-button-com middle" @click.stop="printOrder(orderInfo)" v-if="orderInfo.payStatus == 1">打印</button>
|
|
|
+ <button class="admin-button-com middle" @click.stop="printOrder(orderInfo)" v-if="orderInfo.payStatus == 1">打印</button>
|
|
|
+ <button class="admin-button-com middle" @click.stop="backMoney(orderInfo)" v-if="orderInfo.status == 5">一键退款</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -196,6 +197,7 @@ import { onlinePrintOrder,cancelOrder } from '@/api/order'
|
|
|
import { getDetB} from "@/api/order";
|
|
|
const commonUtil = require("@/utils/common.js");
|
|
|
import { confirmSettle } from "@/api/settle/index"
|
|
|
+import { refundAmount } from "@/api/refund";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
components: { detailGoods, AppCoupon, ModalModule, RateModule,detailItem,detailWork },
|
|
|
@@ -245,6 +247,17 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ backMoney(info){
|
|
|
+ refundAmount({id:info.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.status == 1){
|
|
|
+ this.$msg('退款成功')
|
|
|
+ }else{
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
printOrder(item){
|
|
|
onlinePrintOrder({id:item.id}).then(res=>{
|
|
|
if(res.code == 1){
|