index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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 lang="scss">
  105. .mask{
  106. z-index: 99;
  107. }
  108. .priceChange .reGoods{
  109. padding: 0 25upx;
  110. margin-top: 50upx;
  111. }
  112. .priceChange .reGoods .bnt{width: 250upx;height:90upx;background-color:#2291f8;font-size:32upx;color:#fff;text-align: center;line-height: 90upx;
  113. border-radius:45upx;}
  114. .priceChange .reGoods .bnt.grey{
  115. background-color:#eee;
  116. color:#312b2b;
  117. }
  118. .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;}
  119. .priceChange.on{opacity:1;transform: scale(1);}
  120. .priceChange.goodsOn{height: 380upx;}
  121. .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;}
  122. .priceChange .priceTitle .iconfont{position:absolute;font-size:40upx;right:26upx;top:23upx;width:40upx;height:40upx;line-height:40upx;}
  123. .priceChange .listChange{ width: 100%; padding:0 20rpx;}
  124. .priceChange .listChange textarea{box-sizing: border-box;}
  125. .priceChange .listChange .item{height:103upx;border-bottom:1px solid #e3e3e3;font-size:32upx;color:#333;}
  126. .priceChange .listChange .title{
  127. font-size: 32rpx;
  128. text-align: center;
  129. margin-top: 52rpx;
  130. }
  131. .priceChange .listChange .item .money{color:#666;width:300upx;text-align:right;}
  132. .priceChange .listChange .item .money .iconfont{font-size:32upx;margin-left:20upx;}
  133. .priceChange .listChange .item .money input{width:100%;height:100%;text-align:right;color:#ccc;}
  134. .priceChange .listChange .item .money input.on{color:#666;}
  135. .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;}
  136. .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;}
  137. .priceChange .listChange textarea {
  138. border: 1px solid #eee;
  139. width: 100%;
  140. height: 200upx;
  141. margin-top: 50upx;
  142. border-radius: 10upx;
  143. color: #333;
  144. padding: 10rpx 14rpx;
  145. box-sizing: border-box;
  146. }
  147. </style>
  148. <script>
  149. export default {
  150. name: "PriceChange",
  151. components: {},
  152. props: {
  153. change: {
  154. type: Boolean,
  155. default: false
  156. },
  157. orderInfo: {
  158. type: Object,
  159. default: () => {}
  160. },
  161. status: {
  162. type:String,
  163. default:""
  164. },
  165. isRefund: {
  166. type:Number||String,
  167. default:0
  168. }
  169. },
  170. data: function() {
  171. return {
  172. focus: false,
  173. price: 0,
  174. refund_price: 0,
  175. remark: "",
  176. refuse_reason:''
  177. };
  178. },
  179. watch: {
  180. orderInfo: function(nVal) {
  181. this.price = this.orderInfo.pay_price;
  182. this.refund_price = this.orderInfo.pay_price;
  183. this.remark = this.orderInfo.remark;
  184. }
  185. },
  186. mounted: function() {
  187. },
  188. methods: {
  189. openRefund(){
  190. this.$emit('statusChange','8');
  191. },
  192. priceChange: function() {
  193. this.focus = true;
  194. },
  195. close: function() {
  196. this.price = this.orderInfo.pay_price;
  197. this.$emit("closechange", false);
  198. },
  199. save: function() {
  200. let that = this;
  201. that.$emit("savePrice", {
  202. price: that.price,
  203. refund_price: that.refund_price,
  204. type: 1,
  205. remark: that.remark
  206. });
  207. },
  208. refuse: function() {
  209. let that = this;
  210. that.$emit("savePrice", {
  211. price: that.price,
  212. refund_price: that.refund_price,
  213. type: 2,
  214. remark: that.remark,
  215. refuse_reason:that.refuse_reason
  216. });
  217. }
  218. }
  219. };
  220. </script>