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

347 lines
7.0 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 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" ref="commoditySelect"/>
  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. onShow() {
  113. this.$refs.commoditySelect.getList()
  114. },
  115. methods: {
  116. openSpPopup() {
  117. this.$refs.spPopup.open('bottom');
  118. },
  119. // 选择退换货商品回调
  120. selectCommodity(e) {
  121. console.log(e, "selectCommodity--e")
  122. this.commodity = e
  123. this.$refs.spPopup.close()
  124. },
  125. confirm() {
  126. console.log("===");
  127. },
  128. deleteImage(e) {
  129. this.fileList.splice(e.index, 1)
  130. },
  131. afterRead(e) {
  132. let self = this
  133. e.file.forEach(file => {
  134. self.$Oss.ossUpload(file.url).then(url => {
  135. self.fileList.push({
  136. url
  137. })
  138. })
  139. })
  140. },
  141. }
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. * {
  146. box-sizing: border-box;
  147. }
  148. .refundsOrExchange {
  149. .frame {
  150. display: flex;
  151. flex-direction: column;
  152. gap: 30rpx;
  153. width: 100%;
  154. padding-top: 40rpx;
  155. background-color: #f5f5f5;
  156. .itme1 {
  157. display: flex;
  158. height: 200rpx;
  159. background-color: #ffffff;
  160. .left {
  161. padding: 20rpx;
  162. width: 150rpx;
  163. height: 150rpx;
  164. border-radius: 20rpx;
  165. background-color: #ffffff;
  166. flex-shrink: 0;
  167. image{
  168. width: 100%;
  169. height: 100%;
  170. border-radius: 20rpx;
  171. }
  172. }
  173. .center {
  174. display: flex;
  175. flex-direction: column;
  176. justify-content: center;
  177. gap: 20rpx;
  178. width: 60%;
  179. padding: 0rpx 0 0 20rpx;
  180. background-color: #ffffff;
  181. // 给第一个 view 设置样式
  182. >view:first-of-type {
  183. font-size: 36rpx;
  184. color: #333;
  185. }
  186. // 给第二个 view 设置样式
  187. >view:nth-of-type(2) {
  188. font-size: 28rpx;
  189. color: #666666;
  190. }
  191. }
  192. .right {
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. width: 10%;
  197. color: #666666;
  198. background-color: #ffffff;
  199. }
  200. }
  201. .item2 {
  202. width: 100vw;
  203. .type {
  204. display: flex;
  205. align-items: center;
  206. background-color: #FFF;
  207. height: 80rpx;
  208. padding: 0 0 0 20rpx;
  209. >span:nth-of-type(1) {
  210. width: 30%;
  211. }
  212. >span:nth-of-type(2) {
  213. width: 70%;
  214. }
  215. }
  216. .reason {
  217. display: flex;
  218. align-items: center;
  219. background-color: #FFF;
  220. height: 80rpx;
  221. // margin: 10rpx 0 0 0;
  222. padding: 10rpx 0 0 20rpx;
  223. >view:nth-of-type(1) {
  224. width: 30%;
  225. }
  226. >view:nth-of-type(2) {
  227. width: 70%;
  228. padding: 0 20rpx 0 0;
  229. }
  230. }
  231. }
  232. .item3 {
  233. width: 100vw;
  234. .type {
  235. display: flex;
  236. align-items: center;
  237. background-color: #FFF;
  238. height: 80rpx;
  239. padding: 0 0 0 20rpx;
  240. >span:nth-of-type(1) {
  241. width: 70%;
  242. }
  243. >span:nth-of-type(2) {
  244. width: 30%;
  245. }
  246. }
  247. .reason {
  248. display: flex;
  249. align-items: center;
  250. background-color: #FFF;
  251. height: 80rpx;
  252. // margin: 10rpx 0 0 0;
  253. padding: 10rpx 0 0 20rpx;
  254. >view:nth-of-type(1) {
  255. width: 30%;
  256. }
  257. >view:nth-of-type(2) {
  258. width: 70%;
  259. padding: 0 20rpx 0 0;
  260. }
  261. }
  262. }
  263. .item4 {
  264. display: flex;
  265. flex-direction: column;
  266. padding: 10rpx 0 0 20rpx;
  267. background-color: #FFF;
  268. >view:nth-of-type(1) {
  269. background-color: #FFF;
  270. }
  271. >view:nth-of-type(2) {
  272. margin: 10rpx 0 10rpx 0;
  273. background-color: #FFF;
  274. }
  275. }
  276. .item5 {
  277. display: flex;
  278. flex-direction: column;
  279. padding: 0 0 0 20rpx;
  280. background-color: #FFF;
  281. .phone {
  282. display: flex;
  283. align-items: center;
  284. background-color: #FFF;
  285. height: 80rpx;
  286. // margin: 10rpx 0 0 0;
  287. padding: 10rpx 0 0 20rpx;
  288. >view:nth-of-type(1) {
  289. width: 30%;
  290. }
  291. >view:nth-of-type(2) {
  292. width: 70%;
  293. padding: 0 20rpx 0 0;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. </style>