建材商城系统20241014
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.

361 lines
7.7 KiB

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