applyAfterSale.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view class="">
  3. <view class="applyAfterSale-top">
  4. <view class="l">
  5. <view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
  6. 夕阳红康养团7日游
  7. </view>
  8. <view class="" style="font-size: 22rpx;margin: 20rpx 0;">
  9. 出行日期:2022-04-25
  10. </view>
  11. <view class="" style="font-size: 22rpx;">
  12. 数量 1
  13. </view>
  14. </view>
  15. <view class="r">
  16. <image src="https://t38.9026.com/uploads/golf/images/2022-05-31/20220531601652.png" mode="widthFix"></image>
  17. <view class="" style="margin-top: 20rpx;">
  18. <text style="font-size: 22rpx;">订单金额</text><text style="font-size: 32rpx;font-weight: 600;">¥12121</text>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="applyAfterSale-center">
  23. <u--form :model="form">
  24. <u-form-item label="退款原因" labelWidth=200 prop="userInfo.name" borderBottom ref="item1">
  25. <picker @change="bindPickerChange" :value="form.userInfo.name" :range="Array">
  26. <view class="" style="display: flex;">
  27. <u--input v-model="form.userInfo.name" disabled disabledColor="#ffffff" border="none" placeholder="请输入退款原因" placeholderStyle="color: #555555"></u--input>
  28. <u-icon slot="right" name="arrow-right"></u-icon>
  29. </view>
  30. </picker>
  31. </u-form-item>
  32. <u-form-item label="退款金额" labelWidth=200 prop="userInfo.amount" borderBottom ref="item1">
  33. <u--input v-model="form.userInfo.amount" border="none" placeholder="最多可退款¥1690" placeholderStyle="color: #555555"></u--input>
  34. </u-form-item>
  35. <u-form-item label="备注信息" labelWidth=200 prop="userInfo.mes" borderBottom ref="item1">
  36. <u--input v-model="form.userInfo.mes" border="none" placeholder="请输入备注" placeholderStyle="color: #555555"></u--input>
  37. </u-form-item>
  38. <u-form-item label="联系方式" labelWidth=200 prop="userInfo.number" borderBottom ref="item1">
  39. <u--input v-model="form.userInfo.number" border="none" placeholder="请输入联系方式" placeholderStyle="color: #555555"></u--input>
  40. </u-form-item>
  41. <view class="">
  42. <view class="" style="margin: 40rpx 0;">
  43. 备注信息
  44. </view>
  45. <u--textarea v-model="value" placeholder="请输入退款原因" placeholderStyle="color: #555555" height=160 border="none"></u--textarea>
  46. </view>
  47. <view class="" style="font-size: 36rpx;font-weight: 600;margin: 24rpx 0;">
  48. 退款说明
  49. </view>
  50. <view class="" style="margin-bottom: 40rpx;">
  51. 退款将退到原账户,请知悉!
  52. </view>
  53. <view class="applyAfterSale-footer">
  54. <view class="" style="margin: 20rpx 0;">
  55. 上传凭证
  56. </view>
  57. <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="6" width="200rpx" height="200rpx"></u-upload>
  58. </view>
  59. </u--form>
  60. </view>
  61. <!-- 退款原因选择 -->
  62. <u-picker :show="show" :columns="columns" confirmColor="#1E9F6A"></u-picker>
  63. <!-- <view class="" style="margin-bottom: 144rpx;"></view> -->
  64. <view class="navbar">
  65. 申请退款
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default{
  71. data(){
  72. return{
  73. value:'',
  74. fileList1: [],
  75. index:0,
  76. form:{
  77. userInfo:{
  78. name:"",
  79. amount:'',
  80. mes:"",
  81. number:''
  82. }
  83. },
  84. show: false,
  85. Array: ['个人', '产品', '其他'],
  86. }
  87. },
  88. methods:{
  89. // 选择yuany
  90. bindPickerChange(e) {
  91. console.log('picker发送选择改变,携带值为', e.detail.value)
  92. // console.log(this.genderArray[e.detail.value])
  93. this.form.userInfo.name=this.Array[e.detail.value]
  94. },
  95. // 删除图片
  96. deletePic(event) {
  97. this[`fileList${event.name}`].splice(event.index, 1)
  98. },
  99. // 新增图片
  100. async afterRead(event) {
  101. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  102. let lists = [].concat(event.file)
  103. let fileListLen = this[`fileList${event.name}`].length
  104. lists.map((item) => {
  105. this[`fileList${event.name}`].push({
  106. ...item,
  107. status: 'uploading',
  108. message: '上传中'
  109. })
  110. })
  111. for (let i = 0; i < lists.length; i++) {
  112. const result = await this.uploadFilePromise(lists[i].url)
  113. let item = this[`fileList${event.name}`][fileListLen]
  114. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  115. status: 'success',
  116. message: '',
  117. url: result
  118. }))
  119. fileListLen++
  120. }
  121. },
  122. uploadFilePromise(url) {
  123. return new Promise((resolve, reject) => {
  124. let a = uni.uploadFile({
  125. url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
  126. filePath: url,
  127. name: 'file',
  128. formData: {
  129. user: 'test'
  130. },
  131. success: (res) => {
  132. setTimeout(() => {
  133. resolve(res.data.data)
  134. }, 1000)
  135. }
  136. });
  137. })
  138. },
  139. }
  140. }
  141. </script>
  142. <style lang="less">
  143. .u-form-item__body.data-v-5e7216f1{
  144. padding: 18px 0 !important;
  145. }
  146. .u-textarea.data-v-81cd9d32{
  147. background-color:#F4F4F4 !important;
  148. }
  149. page{
  150. background-color: #F4F4F4;
  151. font-size: 32rpx;
  152. }
  153. .applyAfterSale-top{
  154. margin: 24rpx 0 0;
  155. padding:40rpx 30rpx;
  156. background: #FFFFFF;
  157. box-shadow: 0px 2rpx 4px 0px rgba(0, 0, 0, 0.02);
  158. border-radius: 16rpx 56rpx 8rpx 8rpx;
  159. display: flex;
  160. justify-content: space-between;
  161. align-items: center;
  162. .r{
  163. text-align: right;
  164. }
  165. image{
  166. width: 140rpx;
  167. border-radius: 6rpx;
  168. }
  169. }
  170. .applyAfterSale-center{
  171. margin-top: 24rpx;
  172. padding: 30rpx;
  173. background-color: #ffffff;
  174. border-radius: 8rpx 8rpx 16rpx 56rpx;
  175. margin-bottom: 144rpx;
  176. }
  177. .navbar{
  178. padding: 30rpx 0;
  179. text-align: center;
  180. background:#1E9F6A ;
  181. color: #fff;
  182. bottom: 0;
  183. margin: 0 auto;
  184. left: 0;
  185. position: fixed;
  186. width: 100%;
  187. border-radius: 16rpx 16rpx 0px 0px;
  188. }
  189. </style>