index.vue 5.4 KB

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