酒店桌布为微信小程序
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.

349 lines
6.9 KiB

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