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

348 lines
7.0 KiB

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