order-operate.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="slot">
  3. <view class="inner">
  4. <view class="price">
  5. <text>¥</text>
  6. <text>{{ data.actual_total_amount }}</text>
  7. </view>
  8. <view class="right btnGroup">
  9. <view class="btn" v-if="data.status == '10'">
  10. <u-button shape="circle" size="small" type="default" @click="cancelOrder(data.id)">取消订单</u-button>
  11. </view>
  12. <view class="btn" v-if="data.status == '10'">
  13. <u-button shape="circle" size="small" type="primary" @click="goPay(data)">去付款</u-button>
  14. </view>
  15. <view class="btn" v-if="data.status == '11'||data.status == '12'">
  16. <u-button type="default" size="small" shape="circle" @click="applyAfterSales(data.id)">申请售后</u-button>
  17. </view>
  18. <view class="btn" v-if="data.status == '11'">
  19. <u-button shape="circle" size="small" type="primary" @click="pushDelivery">待发货</u-button>
  20. </view>
  21. <view class="btn" v-if="data.status == '12'">
  22. <u-button shape="circle" size="small" type="primary" @click="confirmReceipt(data)" @refresh="refreshPage">确认收货</u-button>
  23. </view>
  24. <view class="btn" v-if="data.status == '13'">
  25. <u-button shape="circle" size="small" type="primary">已完成</u-button>
  26. </view>
  27. <view class="btn" v-if="data.status == '14'">
  28. <u-button shape="circle" size="small" type="default">交易关闭</u-button>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import { orderOperate } from '@/pages-mall/mixins/order-operate.js';
  36. export default {
  37. // 工单操作方法混入
  38. mixins: [orderOperate],
  39. props: {
  40. // 数据源
  41. data: {
  42. type: Object,
  43. default: () => {
  44. return {};
  45. }
  46. }
  47. },
  48. methods: {
  49. refreshPage(){
  50. this.$emit('refresh')
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .slot {
  57. position: fixed;
  58. bottom: 0;
  59. left: 0;
  60. width: 100%;
  61. background-color: $app-theme-bg-color;
  62. min-height: 100rpx;
  63. box-shadow: $app-theme-shadow;
  64. border-top: 1px solid $app-theme-border-color;
  65. padding: 10rpx 0;
  66. padding-bottom: constant(safe-area-inset-bottom);
  67. padding-bottom: env(safe-area-inset-bottom);
  68. .inner {
  69. display: flex;
  70. justify-content: space-between;
  71. align-items: center;
  72. height: 100%;
  73. .price {
  74. padding-left: 30rpx;
  75. text:nth-child(1) {
  76. font-size: 24rpx;
  77. font-family: PingFangSC-Medium, PingFang SC;
  78. font-weight: 500;
  79. color: $app-theme-text-money-color;
  80. }
  81. text:nth-child(2) {
  82. font-size: 36rpx;
  83. font-family: PingFangSC-Regular, PingFang SC;
  84. font-weight: 400;
  85. color: $app-theme-text-money-color;
  86. }
  87. }
  88. }
  89. }
  90. .right {
  91. padding-right: 30rpx;
  92. }
  93. </style>