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

362 lines
8.0 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" @click="openSpPopup">
  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>{{ 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'>
  72. </bottomBtn>
  73. <!--商品选择-->
  74. <uv-popup ref="spPopup" :round="30">
  75. <commoditySelect
  76. :commodityList="commodityList"
  77. @selectSp="selectCommodity"
  78. />
  79. </uv-popup>
  80. </view>
  81. </template>
  82. <script>
  83. import bottomBtn from "../../components/bottom/bottomBtn.vue"
  84. import commoditySelect from "../components/commodity/commoditySelect.vue"
  85. export default {
  86. onLoad(option) {
  87. this.titleIndex = option.index
  88. },
  89. components: {
  90. bottomBtn, commoditySelect
  91. },
  92. data() {
  93. return {
  94. titleIndex: 0,
  95. title: ['申请换货', '申请退货'],
  96. fileList: [],
  97. bottomBtnStyle: {
  98. color: '#FFF',
  99. backgroundColor: '#fd5100',
  100. fontSize: '34rpx',
  101. text: '提交申请',
  102. width: '400rpx',
  103. height: '80rpx',
  104. borderRadius: '100rpx'
  105. },
  106. commodityList: [
  107. {
  108. title: '商品名称',
  109. smallTitle: '产品规格:120*4*75【桌子尺寸】',
  110. total:1,
  111. },
  112. {
  113. title: '商品名称1',
  114. smallTitle: '产品规格:120*4*75【桌子尺寸】',
  115. total:1,
  116. },
  117. {
  118. title: '商品名称2',
  119. smallTitle: '产品规格:120*4*75【桌子尺寸】',
  120. total:1,
  121. }
  122. ],
  123. commodity: {
  124. title: '商品名称',
  125. smallTitle: '产品规格:120*4*75【桌子尺寸】',
  126. total:1,
  127. },
  128. }
  129. },
  130. mounted() {
  131. },
  132. methods: {
  133. openSpPopup() {
  134. this.$refs.spPopup.open('bottom');
  135. },
  136. // 选择退换货商品回调
  137. selectCommodity(e) {
  138. console.log(e, "selectCommodity--e")
  139. this.commodity = e
  140. this.$refs.spPopup.close()
  141. },
  142. confirm() {
  143. console.log("===");
  144. },
  145. deleteImage(e) {
  146. this.fileList.splice(e.index, 1)
  147. },
  148. afterRead(e) {
  149. let self = this
  150. e.file.forEach(file => {
  151. self.$Oss.ossUpload(file.url).then(url => {
  152. self.fileList.push({
  153. url
  154. })
  155. })
  156. })
  157. },
  158. }
  159. }
  160. </script>
  161. <style lang="less" scoped>
  162. * {
  163. box-sizing: border-box;
  164. }
  165. .refundsOrExchange {
  166. .frame {
  167. display: flex;
  168. flex-direction: column;
  169. gap: 30rpx;
  170. width: 100%;
  171. padding-top: 40rpx;
  172. background-color: #f5f5f5;
  173. .itme1 {
  174. display: flex;
  175. height: 200rpx;
  176. background-color: #ffffff;
  177. .left {
  178. padding: 40rpx;
  179. width: 20%;
  180. border-radius: 10rpx;
  181. background-color: #ffffff;
  182. }
  183. .center {
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: center;
  187. gap: 20rpx;
  188. width: 60%;
  189. padding: 0rpx 0 0 20rpx;
  190. background-color: #ffffff;
  191. // 给第一个 view 设置样式
  192. > view:first-of-type {
  193. font-size: 36rpx;
  194. color: #333;
  195. }
  196. // 给第二个 view 设置样式
  197. > view:nth-of-type(2) {
  198. font-size: 28rpx;
  199. color: #666666;
  200. }
  201. }
  202. .right {
  203. display: flex;
  204. justify-content: center;
  205. align-items: center;
  206. width: 10%;
  207. color: #666666;
  208. background-color: #ffffff;
  209. }
  210. }
  211. .item2 {
  212. width: 100vw;
  213. .type {
  214. display: flex;
  215. align-items: center;
  216. background-color: #FFF;
  217. height: 80rpx;
  218. padding: 0 0 0 20rpx;
  219. > span:nth-of-type(1) {
  220. width: 30%;
  221. }
  222. > span:nth-of-type(2) {
  223. width: 70%;
  224. }
  225. }
  226. .reason {
  227. display: flex;
  228. align-items: center;
  229. background-color: #FFF;
  230. height: 80rpx;
  231. // margin: 10rpx 0 0 0;
  232. padding: 10rpx 0 0 20rpx;
  233. > view:nth-of-type(1) {
  234. width: 30%;
  235. }
  236. > view:nth-of-type(2) {
  237. width: 70%;
  238. padding: 0 20rpx 0 0;
  239. }
  240. }
  241. }
  242. .item3 {
  243. width: 100vw;
  244. .type {
  245. display: flex;
  246. align-items: center;
  247. background-color: #FFF;
  248. height: 80rpx;
  249. padding: 0 0 0 20rpx;
  250. > span:nth-of-type(1) {
  251. width: 70%;
  252. }
  253. > span:nth-of-type(2) {
  254. width: 30%;
  255. }
  256. }
  257. .reason {
  258. display: flex;
  259. align-items: center;
  260. background-color: #FFF;
  261. height: 80rpx;
  262. // margin: 10rpx 0 0 0;
  263. padding: 10rpx 0 0 20rpx;
  264. > view:nth-of-type(1) {
  265. width: 30%;
  266. }
  267. > view:nth-of-type(2) {
  268. width: 70%;
  269. padding: 0 20rpx 0 0;
  270. }
  271. }
  272. }
  273. .item4 {
  274. display: flex;
  275. flex-direction: column;
  276. padding: 10rpx 0 0 20rpx;
  277. background-color: #FFF;
  278. > view:nth-of-type(1) {
  279. background-color: #FFF;
  280. }
  281. > view:nth-of-type(2) {
  282. margin: 10rpx 0 10rpx 0;
  283. background-color: #FFF;
  284. }
  285. }
  286. .item5 {
  287. display: flex;
  288. flex-direction: column;
  289. padding: 0 0 0 20rpx;
  290. background-color: #FFF;
  291. .phone {
  292. display: flex;
  293. align-items: center;
  294. background-color: #FFF;
  295. height: 80rpx;
  296. // margin: 10rpx 0 0 0;
  297. padding: 10rpx 0 0 20rpx;
  298. > view:nth-of-type(1) {
  299. width: 30%;
  300. }
  301. > view:nth-of-type(2) {
  302. width: 70%;
  303. padding: 0 20rpx 0 0;
  304. }
  305. }
  306. }
  307. }
  308. }
  309. </style>