酒店桌布为微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

311 lines
6.1 KiB

  1. <template>
  2. <view class="refundsOrExchange">
  3. <navbar :title="title[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="frame">
  5. <!-- 商品简介 -->
  6. <view class="itme1">
  7. <view class="left">
  8. <img src="../../static/image/center/1.png" alt="" style="width: 100%;height: 100%;">
  9. </view>
  10. <view class="center">
  11. <view>桌布退货</view>
  12. <view>产品规格120*4*75桌子尺寸</view>
  13. </view>
  14. <view class="right">×3</view>
  15. </view>
  16. <!-- 申请类型&申请原因 -->
  17. <view class="item2">
  18. <view class="type">
  19. <span>申请类型</span>
  20. <span>退货退款</span>
  21. </view>
  22. <uv-line></uv-line>
  23. <view class="reason">
  24. <view>申请原因</view>
  25. <view>
  26. <uv-input placeholder="请输入申请原因" border="none" clearable></uv-input>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 退货数量&申请金额-->
  31. <view class="item3">
  32. <view class="type">
  33. <span>{{titleIndex==0?'退货数量' :'换货数量'}}</span>
  34. <span>
  35. <uv-number-box :min="1" :max="100"></uv-number-box>
  36. </span>
  37. </view>
  38. <uv-line v-if='titleIndex == 0 ? true :false'></uv-line>
  39. <view class="reason" v-if='titleIndex == 0 ? true :false'>
  40. <view>申请原因</view>
  41. <view>
  42. <uv-input disabled placeholder="$" border="none" clearable></uv-input>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 申请说明 -->
  47. <view class="item4">
  48. <view>申请说明(选填)</view>
  49. <view>
  50. <uv-input placeholder="请您详细填写申请说明" border="none" clearable></uv-input>
  51. </view>
  52. <view>
  53. <uv-upload :fileList="fileList" :maxCount="5" multiple width="150rpx" height="150rpx"
  54. @delete="deleteImage" @afterRead="afterRead" :previewFullImage="true"></uv-upload>
  55. </view>
  56. </view>
  57. <!-- 联系电话 -->
  58. <view class="item5">
  59. <view class="phone">
  60. <view>联系电话</view>
  61. <view>
  62. <uv-input placeholder="请输入联系电话" border="none" clearable></uv-input>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 底部按钮 -->
  68. <bottomBtn @confirm='confirm()' :color='bottomBtnStyle.color' :backgroundColor='bottomBtnStyle.backgroundColor'
  69. :fontSize='bottomBtnStyle.fontSize' :text='bottomBtnStyle.text' :width="bottomBtnStyle.width"
  70. :height="bottomBtnStyle.height" :borderRadius='bottomBtnStyle.borderRadius'>
  71. </bottomBtn>
  72. </view>
  73. </template>
  74. <script>
  75. import bottomBtn from "../../components/bottom/bottomBtn.vue"
  76. export default {
  77. onLoad(option) {
  78. this.titleIndex = option.index
  79. },
  80. components: {
  81. bottomBtn
  82. },
  83. data() {
  84. return {
  85. titleIndex: 0,
  86. title: ['申请换货', '申请退货'],
  87. fileList: [],
  88. bottomBtnStyle: {
  89. color: '#FFF',
  90. backgroundColor: '#fd5100',
  91. fontSize: '34rpx',
  92. text: '提交申请',
  93. width: '400rpx',
  94. height: '80rpx',
  95. borderRadius: '100rpx'
  96. },
  97. }
  98. },
  99. mounted() {
  100. },
  101. methods: {
  102. confirm() {
  103. console.log("===");
  104. },
  105. deleteImage(e) {
  106. this.fileList.splice(e.index, 1)
  107. },
  108. afterRead(e) {
  109. let self = this
  110. e.file.forEach(file => {
  111. self.$Oss.ossUpload(file.url).then(url => {
  112. self.fileList.push({
  113. url
  114. })
  115. })
  116. })
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="less" scoped>
  122. * {
  123. box-sizing: border-box;
  124. }
  125. .refundsOrExchange {
  126. .frame {
  127. display: flex;
  128. flex-direction: column;
  129. gap: 30rpx;
  130. width: 100%;
  131. padding-top: 40rpx;
  132. background-color: #f5f5f5;
  133. .itme1 {
  134. display: flex;
  135. height: 200rpx;
  136. background-color: #ffffff;
  137. .left {
  138. padding: 40rpx;
  139. width: 20%;
  140. border-radius: 10rpx;
  141. background-color: #ffffff;
  142. }
  143. .center {
  144. display: flex;
  145. flex-direction: column;
  146. justify-content: center;
  147. gap: 20rpx;
  148. width: 60%;
  149. padding: 0rpx 0 0 20rpx;
  150. background-color: #ffffff;
  151. // 给第一个 view 设置样式
  152. >view:first-of-type {
  153. font-size: 36rpx;
  154. color: #333;
  155. }
  156. // 给第二个 view 设置样式
  157. >view:nth-of-type(2) {
  158. font-size: 28rpx;
  159. color: #666666;
  160. }
  161. }
  162. .right {
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. width: 10%;
  167. color: #666666;
  168. background-color: #ffffff;
  169. }
  170. }
  171. .item2 {
  172. width: 100vw;
  173. .type {
  174. display: flex;
  175. align-items: center;
  176. background-color: #FFF;
  177. height: 80rpx;
  178. padding: 0 0 0 20rpx;
  179. >span:nth-of-type(1) {
  180. width: 30%;
  181. }
  182. >span:nth-of-type(2) {
  183. width: 70%;
  184. }
  185. }
  186. .reason {
  187. display: flex;
  188. align-items: center;
  189. background-color: #FFF;
  190. height: 80rpx;
  191. // margin: 10rpx 0 0 0;
  192. padding: 10rpx 0 0 20rpx;
  193. >view:nth-of-type(1) {
  194. width: 30%;
  195. }
  196. >view:nth-of-type(2) {
  197. width: 70%;
  198. padding: 0 20rpx 0 0;
  199. }
  200. }
  201. }
  202. .item3 {
  203. width: 100vw;
  204. .type {
  205. display: flex;
  206. align-items: center;
  207. background-color: #FFF;
  208. height: 80rpx;
  209. padding: 0 0 0 20rpx;
  210. >span:nth-of-type(1) {
  211. width: 70%;
  212. }
  213. >span:nth-of-type(2) {
  214. width: 30%;
  215. }
  216. }
  217. .reason {
  218. display: flex;
  219. align-items: center;
  220. background-color: #FFF;
  221. height: 80rpx;
  222. // margin: 10rpx 0 0 0;
  223. padding: 10rpx 0 0 20rpx;
  224. >view:nth-of-type(1) {
  225. width: 30%;
  226. }
  227. >view:nth-of-type(2) {
  228. width: 70%;
  229. padding: 0 20rpx 0 0;
  230. }
  231. }
  232. }
  233. .item4 {
  234. display: flex;
  235. flex-direction: column;
  236. padding: 10rpx 0 0 20rpx;
  237. background-color: #FFF;
  238. >view:nth-of-type(1) {
  239. background-color: #FFF;
  240. }
  241. >view:nth-of-type(2) {
  242. margin: 10rpx 0 10rpx 0;
  243. background-color: #FFF;
  244. }
  245. }
  246. .item5 {
  247. display: flex;
  248. flex-direction: column;
  249. padding: 0 0 0 20rpx;
  250. background-color: #FFF;
  251. .phone {
  252. display: flex;
  253. align-items: center;
  254. background-color: #FFF;
  255. height: 80rpx;
  256. // margin: 10rpx 0 0 0;
  257. padding: 10rpx 0 0 20rpx;
  258. >view:nth-of-type(1) {
  259. width: 30%;
  260. }
  261. >view:nth-of-type(2) {
  262. width: 70%;
  263. padding: 0 20rpx 0 0;
  264. }
  265. }
  266. }
  267. }
  268. }
  269. </style>