PriceChange.vue 4.1 KB

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