after_sale_apply.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <!-- 申请售后 -->
  3. <view class="dt-page">
  4. <view class="comp-list-item" @tap="showSaleType">
  5. <view class="left-item">
  6. <text>售后类型</text>
  7. </view>
  8. <view class="right-item">
  9. <input :value="saleTypeLabel" type="text" placeholder="请选择售后类型" disabled/>
  10. <image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
  11. </view>
  12. </view>
  13. <view class="comp-list-item">
  14. <view class="left-item">
  15. <text>订单编号</text>
  16. </view>
  17. <view class="right-item">{{ loadOptions.orderSn|defaultValue('无') }}</view>
  18. </view>
  19. <view class="item-margin"></view>
  20. <view class="comp-list-item form-block">
  21. <view class="left-item">
  22. <text>售后原因</text>
  23. </view>
  24. <view class="right-item">
  25. <textarea v-model="formData.reason" class="reason" maxlength="-1" placeholder="请输入您售后的原因"></textarea>
  26. </view>
  27. </view>
  28. <FootToolbar bgColor="#fff">
  29. <view slot="main" class="btn-voucher-wrap">
  30. <button @tap="tapSubmit" class="dt-btn-submit btn-voucher" hover-class="button-hover-scale">提交售后申请</button>
  31. </view>
  32. </FootToolbar>
  33. <FootSaleType ref="footSaleType"
  34. :dataList.sync="saleTypeList"
  35. @choose="onChoose" />
  36. </view>
  37. </template>
  38. <script>
  39. import FootSaleType from '../comps/foot_sale_type.vue'
  40. import FootToolbar from '../comps/foot_toolbar.vue'
  41. export default {
  42. components:{
  43. FootSaleType,
  44. FootToolbar
  45. },
  46. data(){
  47. return {
  48. saleTypeList:[
  49. { label:'申请换货',value:2, checked:false },
  50. { label:'申请退货',value:3, checked:false }
  51. ],
  52. saleTypeLabel:'',
  53. formData:{
  54. saleType:'', // 售后类型
  55. reason:'', // 售后原因
  56. },
  57. formRules:{
  58. saleType:[{
  59. required:true,
  60. message:'请选择售后类型'
  61. }],
  62. reason:[{
  63. required:true,
  64. message:'请输入退货原因'
  65. }],
  66. },
  67. }
  68. },
  69. methods:{
  70. showSaleType(){
  71. this.$refs.footSaleType.show(this.formData.saleType)
  72. },
  73. onChoose(curCheck){
  74. this.formData.saleType = curCheck.value
  75. this.saleTypeLabel = curCheck.label
  76. },
  77. tapSubmit(){
  78. if(!this.validate(this.formRules,this.formData)){
  79. return
  80. }
  81. let params = Object.assign({}, this.loadOptions, this.formData)
  82. uni.navigateTo({
  83. url:'/pagesM/pages/after_sale_submit?'+this.$util.serialize(params)
  84. })
  85. console.log('提交')
  86. },
  87. onLoadPage(){
  88. wx.hideShareMenu();
  89. if(this.isLoad){
  90. }
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .dt-page{
  97. min-height:100vh;
  98. background-color:#f2f2f2;
  99. .comp-list-item {
  100. position: relative;
  101. display: flex;
  102. flex-direction: row;
  103. align-items: center;
  104. padding: 0 30upx;
  105. color: #353535;
  106. justify-content: space-between;
  107. margin-top: 0;
  108. min-height: 90upx;
  109. border-bottom: 2upx solid #f2f2f2;
  110. background: #fff;
  111. .left-item {
  112. display: flex;
  113. align-items: center;
  114. text {
  115. max-height: 100%;
  116. overflow: hidden;
  117. display: -webkit-box;
  118. -webkit-box-orient: vertical;
  119. -webkit-line-clamp: 1;
  120. text-overflow: ellipsis;
  121. }
  122. }
  123. .right-item {
  124. display: flex;
  125. align-items: center;
  126. justify-content: flex-end;
  127. width:50vw;
  128. min-height:90upx;
  129. text {
  130. color: #999999;
  131. }
  132. image {
  133. margin-left: 20upx;
  134. width: 13upx;
  135. height: 24upx;
  136. }
  137. .reason{
  138. width:100%;
  139. min-height:200upx;
  140. padding-bottom:30upx;
  141. box-sizing:border-box;
  142. }
  143. }
  144. }
  145. .form-block{
  146. flex-wrap:wrap;
  147. .left-item{
  148. width:100%;
  149. line-height:1;
  150. padding:30upx 0;
  151. }
  152. .right-item{
  153. flex-wrap:wrap;
  154. width:100%;
  155. .choose-item{
  156. padding-left:16upx;
  157. width:100%;
  158. display:flex;
  159. align-items: center;
  160. line-height:60upx;
  161. .lable{
  162. padding-left:10upx;
  163. }
  164. }
  165. .choose-item:last-child{
  166. padding-bottom:20upx;
  167. }
  168. }
  169. }
  170. .item-margin{
  171. width:100%;
  172. height:20upx;
  173. }
  174. .hidden{
  175. opacity:0;
  176. }
  177. input{
  178. text-align: right;
  179. }
  180. .btn-voucher-wrap{
  181. display:flex;
  182. justify-content: center;
  183. align-items: center;
  184. width:100vw;
  185. height:110upx;
  186. background-color:#fff;
  187. .btn-voucher{
  188. width:690upx;
  189. height:80upx;
  190. line-height:80upx;
  191. color:#fff;
  192. background-color:$dt-color-primary;
  193. font-size: 30upx;
  194. }
  195. }
  196. }
  197. </style>