index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view>
  3. <view class="priceChange" :class="change === true ? 'on' : ''">
  4. <view class="priceTitle">
  5. {{
  6. status == 0
  7. ? orderInfo.refund_status === 1
  8. ? $t(`立即退款`)
  9. : $t(`一键改价`)
  10. : $t(`订单备注`)
  11. }}
  12. <span class="iconfont icon-guanbi" @click="close"></span>
  13. </view>
  14. <view class="listChange" v-if="status == 0">
  15. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
  16. <view>{{ $t(`商品总价`) }}({{ $t(`¥`) }})</view>
  17. <view class="money">
  18. {{ orderInfo.total_price }}<span class="iconfont icon-suozi"></span>
  19. </view>
  20. </view>
  21. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
  22. <view>{{ $t(`原始邮费`) }}({{ $t(`¥`) }})</view>
  23. <view class="money">
  24. {{ orderInfo.pay_postage }}<span class="iconfont icon-suozi"></span>
  25. </view>
  26. </view>
  27. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
  28. <view>{{ $t(`实际支付`) }}({{ $t(`¥`) }})</view>
  29. <view class="money">
  30. <input type="text" v-model="price" :class="focus === true ? 'on' : ''" @focus="priceChange" />
  31. </view>
  32. </view>
  33. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 1">
  34. <view>{{ $t(`实际支付`) }}({{ $t(`¥`) }})</view>
  35. <view class="money">
  36. {{ orderInfo.pay_price }}<span class="iconfont icon-suozi"></span>
  37. </view>
  38. </view>
  39. <view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 1">
  40. <view>{{ $t(`退款金额`) }}({{ $t(`¥`) }})</view>
  41. <view class="money">
  42. <input type="text" v-model="refund_price" :class="focus === true ? 'on' : ''" @focus="priceChange" />
  43. </view>
  44. </view>
  45. </view>
  46. <view class="listChange" v-else>
  47. <textarea :placeholder="
  48. orderInfo.remark ? orderInfo.remark : $t(`请填写备注信息`)
  49. " v-model="remark"></textarea>
  50. </view>
  51. <view class="modify" @click="save">
  52. {{
  53. status == 1 || orderInfo.refund_status == 0 ? $t(`立即修改`) : $t(`确认退款`)
  54. }}
  55. </view>
  56. <view class="modify1" @click="refuse" v-if="orderInfo.refund_status == 1 && status == 0">
  57. {{ $t(`拒绝退款`) }}
  58. </view>
  59. </view>
  60. <view class="mask" @touchmove.prevent v-show="change === true"></view>
  61. </view>
  62. </template>
  63. <style>
  64. .priceChange {
  65. position: fixed;
  66. width: 580upx;
  67. height: 670upx;
  68. background-color: #fff;
  69. border-radius: 10upx;
  70. top: 50%;
  71. left: 50%;
  72. margin-left: -290upx;
  73. margin-top: -335upx;
  74. z-index: 666;
  75. transition: all 0.3s ease-in-out 0s;
  76. transform: scale(0);
  77. opacity: 0;
  78. }
  79. .priceChange.on {
  80. opacity: 1;
  81. transform: scale(1);
  82. }
  83. .priceChange .priceTitle {
  84. /* background: url("../../static/pricetitle.jpg") no-repeat; */
  85. background-size: 100% 100%;
  86. width: 100%;
  87. height: 160upx;
  88. border-radius: 10upx 10upx 0 0;
  89. text-align: center;
  90. font-size: 40upx;
  91. color: #fff;
  92. line-height: 160upx;
  93. position: relative;
  94. }
  95. .priceChange .priceTitle .iconfont {
  96. position: absolute;
  97. font-size: 40upx;
  98. right: 26upx;
  99. top: 23upx;
  100. width: 40upx;
  101. height: 40upx;
  102. line-height: 40upx;
  103. }
  104. .priceChange .listChange {
  105. width: 100%;
  106. padding: 0 20rpx;
  107. }
  108. .priceChange .listChange textarea {
  109. box-sizing: border-box;
  110. }
  111. .priceChange .listChange .item {
  112. height: 103upx;
  113. border-bottom: 1px solid #e3e3e3;
  114. font-size: 32upx;
  115. color: #333;
  116. }
  117. .priceChange .listChange .item .money {
  118. color: #666;
  119. width: 300upx;
  120. text-align: right;
  121. }
  122. .priceChange .listChange .item .money .iconfont {
  123. font-size: 32upx;
  124. margin-left: 20upx;
  125. }
  126. .priceChange .listChange .item .money input {
  127. width: 100%;
  128. height: 100%;
  129. text-align: right;
  130. color: #ccc;
  131. }
  132. .priceChange .listChange .item .money input.on {
  133. color: #666;
  134. }
  135. .priceChange .modify {
  136. font-size: 32upx;
  137. color: #fff;
  138. width: 490upx;
  139. height: 90upx;
  140. text-align: center;
  141. line-height: 90upx;
  142. border-radius: 45upx;
  143. background-color: #2291f8;
  144. margin: 53upx auto 0 auto;
  145. }
  146. .priceChange .modify1 {
  147. font-size: 32upx;
  148. color: #312b2b;
  149. width: 490upx;
  150. height: 90upx;
  151. text-align: center;
  152. line-height: 90upx;
  153. border-radius: 45upx;
  154. background-color: #eee;
  155. margin: 30upx auto 0 auto;
  156. }
  157. .priceChange .listChange textarea {
  158. border: 1px solid #eee;
  159. width: 100%;
  160. height: 200upx;
  161. margin-top: 50upx;
  162. border-radius: 10upx;
  163. color: #333;
  164. }
  165. </style>
  166. <script>
  167. export default {
  168. name: "PriceChange",
  169. components: {},
  170. props: {
  171. change: Boolean,
  172. orderInfo: Object,
  173. status: String
  174. },
  175. data: function () {
  176. return {
  177. focus: false,
  178. price: 0,
  179. refund_price: 0,
  180. remark: ""
  181. };
  182. },
  183. watch: {
  184. orderInfo: function (nVal) {
  185. this.price = this.orderInfo.pay_price;
  186. this.refund_price = this.orderInfo.pay_price;
  187. this.remark = "";
  188. }
  189. },
  190. mounted: function () {
  191. },
  192. methods: {
  193. priceChange: function () {
  194. this.focus = true;
  195. },
  196. close: function () {
  197. this.price = this.orderInfo.pay_price;
  198. this.$emit("closechange", false);
  199. },
  200. save: function () {
  201. let that = this;
  202. that.$emit("savePrice", {
  203. price: that.price,
  204. refund_price: that.refund_price,
  205. type: 1,
  206. remark: that.remark
  207. });
  208. },
  209. refuse: function () {
  210. let that = this;
  211. that.$emit("savePrice", {
  212. price: that.price,
  213. refund_price: that.refund_price,
  214. type: 2,
  215. remark: that.remark
  216. });
  217. }
  218. }
  219. };
  220. </script>