小程序端工程代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
3.8 KiB

  1. <template>
  2. <view>
  3. <view class="priceChange" :class="change === true ? 'on' : ''">
  4. <view class="priceTitle">
  5. <text v-if="status==0">
  6. <text v-if="orderInfo.refundStatus == 1">立即退款</text>
  7. <text v-if="orderInfo.refundStatus != 1">一键改价</text>
  8. </text>
  9. <text v-if="status!=0">订单备注</text>
  10. <text class="iconfont icon-guanbi" @click="close"></text>
  11. </view>
  12. <view class="listChange" v-if="status == 0">
  13. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
  14. <view>商品总价(¥)</view>
  15. <view class="money">
  16. {{ orderInfo.totalPrice }}
  17. <text class="iconfont icon-suozi"></text>
  18. </view>
  19. </view>
  20. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
  21. <view>原始邮费(¥)</view>
  22. <view class="money">
  23. {{ orderInfo.payPostage }}
  24. <text class="iconfont icon-suozi"></text>
  25. </view>
  26. </view>
  27. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
  28. <view>实际支付(¥)</view>
  29. <view class="money">
  30. <input
  31. type="text"
  32. v-model="price"
  33. :class="focus === true ? 'on' : ''"
  34. @focus="priceChange"
  35. />
  36. </view>
  37. </view>
  38. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
  39. <view>实际支付(¥)</view>
  40. <view class="money">
  41. {{ orderInfo.payPrice }}
  42. <text class="iconfont icon-suozi"></text>
  43. </view>
  44. </view>
  45. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
  46. <view>退款金额(¥)</view>
  47. <view class="money">
  48. <input
  49. type="text"
  50. v-model="refund_price"
  51. :class="focus === true ? 'on' : ''"
  52. @focus="priceChange"
  53. />
  54. </view>
  55. </view>
  56. </view>
  57. <view class="listChange" v-else>
  58. <textarea
  59. :placeholder="'请填写备注信息...'"
  60. v-model="remark"
  61. ></textarea>
  62. </view>
  63. <view class="modify" @click="save">{{ orderInfo.refundStatus === 0 ? "立即修改" : "确认退款" }}</view>
  64. <view class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1">拒绝退款</view>
  65. </view>
  66. <view class="mask" @touchmove.prevent v-show="change === true"></view>
  67. </view>
  68. </template>
  69. <style scoped lang="less" >
  70. .priceChange .listChange textarea {
  71. border: 1px solid #eee;
  72. width: 100%;
  73. height: 200rpx;
  74. margin-top: 50rpx;
  75. border-radius: 10rpx;
  76. color: #333;
  77. padding: 20rpx;
  78. }
  79. </style>
  80. <script>
  81. export default {
  82. name: "PriceChange",
  83. components: {},
  84. props: {
  85. change: Boolean,
  86. orderInfo: Object,
  87. status: String
  88. },
  89. data: function() {
  90. return {
  91. focus: false,
  92. price: 0,
  93. refund_price: 0,
  94. remark: ""
  95. };
  96. },
  97. watch: {
  98. orderInfo: function() {
  99. this.price = this.orderInfo.payPrice;
  100. this.refund_price = this.orderInfo.payPrice;
  101. this.remark = "";
  102. }
  103. },
  104. mounted: function() {},
  105. methods: {
  106. priceChange: function() {
  107. this.focus = true;
  108. },
  109. close: function() {
  110. this.price = this.orderInfo.payPrice;
  111. this.$emit("closechange", false);
  112. },
  113. save: function() {
  114. let that = this;
  115. that.$emit("savePrice", {
  116. price: that.price,
  117. refund_price: that.refund_price,
  118. type: 1,
  119. remark: that.remark
  120. });
  121. },
  122. refuse: function() {
  123. let that = this;
  124. that.$emit("savePrice", {
  125. price: that.price,
  126. refund_price: that.refund_price,
  127. type: 2,
  128. remark: that.remark
  129. });
  130. }
  131. }
  132. };
  133. </script>