铝交易,微信公众号
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.

365 lines
8.1 KiB

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