index.vue 7.0 KB

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