|
@@ -1,7 +1,11 @@
|
|
|
<template>
|
|
|
<!-- #ifdef H5 -->
|
|
|
- <zj-page-layout :hasFooter="true" :isScroll="true" :refresherTriggered="refresherTriggered"
|
|
|
- @refresherrefresh="refresherrefresh">
|
|
|
+ <zj-page-layout
|
|
|
+ :hasFooter="true"
|
|
|
+ :isScroll="true"
|
|
|
+ :refresherTriggered="refresherTriggered"
|
|
|
+ @refresherrefresh="refresherrefresh"
|
|
|
+ >
|
|
|
<view class="goods-container">
|
|
|
<view class="title">商品信息</view>
|
|
|
<view class="goods">
|
|
@@ -9,10 +13,15 @@
|
|
|
<view class="main">
|
|
|
<view class="name">{{ form.goodsTitle }}</view>
|
|
|
<view class="des">{{ form.goods.content }}</view>
|
|
|
- <view class="price"><text>¥{{ form.goodsAmount }}</text>x{{ form.num }}</view>
|
|
|
+ <view class="price"
|
|
|
+ ><text>¥{{ form.goodsAmount }}</text
|
|
|
+ >x{{ form.num }}</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="total">订单总金额<text>¥{{ form.price }}</text></view>
|
|
|
+ <view class="total"
|
|
|
+ >订单总金额<text>¥{{ form.price }}</text></view
|
|
|
+ >
|
|
|
</view>
|
|
|
|
|
|
<view class="form-container">
|
|
@@ -25,8 +34,12 @@
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="label"><text style="color: red">*</text>退货原因</view>
|
|
|
- <u--textarea style="backgroundcolor: #fff" :disabled="showDisable" v-model="formdata.applyNote"
|
|
|
- placeholder="请输入内容"></u--textarea>
|
|
|
+ <u--textarea
|
|
|
+ style="backgroundcolor: #fff"
|
|
|
+ :disabled="showDisable"
|
|
|
+ v-model="formdata.applyNote"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></u--textarea>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="label">上传图片(最多9张)</view>
|
|
@@ -68,252 +81,201 @@
|
|
|
</zj-page-layout>
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifndef H5 -->
|
|
|
- <web-view :src="webViewHref(`/pages/mine/myBuy/return`, pam,crossPagePam)" @message="crossPage.$listener"></web-view>
|
|
|
+ <web-view :src="webViewHref(`/pages/mine/myBuy/return`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
|
|
|
<!-- #endif -->
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import zjUpload from '@/components/zj-upload/index.vue'
|
|
|
- import {
|
|
|
- tr
|
|
|
- } from '@dcloudio/vue-cli-plugin-uni/packages/postcss/tags'
|
|
|
- export default {
|
|
|
- // #ifndef H5
|
|
|
- data() {
|
|
|
- return {
|
|
|
- pam: {}
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
+import zjUpload from '@/components/zj-upload/index.vue'
|
|
|
+import { tr } from '@dcloudio/vue-cli-plugin-uni/packages/postcss/tags'
|
|
|
+export default {
|
|
|
+ // #ifndef H5
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pam: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- onLoad(pam) {
|
|
|
- this.pam = pam
|
|
|
+ onLoad(pam) {
|
|
|
+ this.pam = pam
|
|
|
+ },
|
|
|
+ // #endif
|
|
|
+ // #ifdef H5
|
|
|
+ components: {
|
|
|
+ zjUpload
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ disabled: false,
|
|
|
+ type: 1,
|
|
|
+ content: '',
|
|
|
+ refresherTriggered: false,
|
|
|
+ form: {
|
|
|
+ goods: {}
|
|
|
+ },
|
|
|
+ formdata: {
|
|
|
+ applyType: 'REFUND',
|
|
|
+ applyNote: ''
|
|
|
+ },
|
|
|
+ showDisable: false,
|
|
|
+ fileList: [],
|
|
|
+ fileurl: [],
|
|
|
+ orderId: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad({ orderId }) {
|
|
|
+ this.orderId = orderId
|
|
|
+ this.getDetail()
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ back() {
|
|
|
+ uni.navigateBack()
|
|
|
},
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- components: {
|
|
|
- zjUpload
|
|
|
+ getFiles(value) {
|
|
|
+ this.fileurl = []
|
|
|
+ value.forEach(v => {
|
|
|
+ this.fileurl.push(v)
|
|
|
+ })
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- disabled: false,
|
|
|
- type: 1,
|
|
|
- content: '',
|
|
|
- refresherTriggered: false,
|
|
|
- form: {
|
|
|
- goods: {}
|
|
|
- },
|
|
|
- formdata: {
|
|
|
- applyType: 'REFUND',
|
|
|
- applyNote: ''
|
|
|
- },
|
|
|
- showDisable: false,
|
|
|
- fileList: [],
|
|
|
- fileurl: [],
|
|
|
- orderId: ''
|
|
|
+ //
|
|
|
+ apply() {
|
|
|
+ if (!this.formdata.applyNote) {
|
|
|
+ this.$toast('缺少必要参数,请检查')
|
|
|
+ return
|
|
|
}
|
|
|
+ this.disabled = true
|
|
|
+ let params = {
|
|
|
+ ...this.formdata,
|
|
|
+ orderId: this.orderId,
|
|
|
+ refundFile: this.fileurl.toString()
|
|
|
+ }
|
|
|
+ this.$toast('正在申请售后中...')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$api
|
|
|
+ .postJson('/refundOrder/apply', params)
|
|
|
+ .then(res => {
|
|
|
+ this.disabled = false
|
|
|
+ this.$navToPage(
|
|
|
+ {
|
|
|
+ url: '/pages/mine/myBuy/list'
|
|
|
+ },
|
|
|
+ 'redirectTo'
|
|
|
+ )
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.disabled = false
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
},
|
|
|
- onLoad({
|
|
|
- orderId
|
|
|
- }) {
|
|
|
- this.orderId = orderId
|
|
|
- this.getDetail()
|
|
|
- },
|
|
|
- onShow() {},
|
|
|
- methods: {
|
|
|
- back() {
|
|
|
- uni.navigateBack()
|
|
|
- },
|
|
|
- getFiles(value) {
|
|
|
- this.fileurl = []
|
|
|
- value.forEach(v => {
|
|
|
- this.fileurl.push(v)
|
|
|
+ //
|
|
|
+ getDetail() {
|
|
|
+ this.$api
|
|
|
+ .postJson('/refundOrder/detail', {
|
|
|
+ orderId: this.orderId
|
|
|
})
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- disabled: false,
|
|
|
- type: 1,
|
|
|
- content: '',
|
|
|
- refresherTriggered: false,
|
|
|
- form: {
|
|
|
- goods: {}
|
|
|
- },
|
|
|
- formdata: {
|
|
|
- applyType: 'REFUND',
|
|
|
- applyNote: ''
|
|
|
- },
|
|
|
- showDisable: false,
|
|
|
- fileList: [],
|
|
|
- fileurl: [],
|
|
|
- orderId: ''
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad({
|
|
|
- orderId
|
|
|
- }) {
|
|
|
- this.orderId = orderId
|
|
|
- },
|
|
|
- onShow() {
|
|
|
- this.getDetail()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- back() {
|
|
|
- uni.navigateBack()
|
|
|
- },
|
|
|
- getFiles(value) {
|
|
|
- this.fileurl = value
|
|
|
- },
|
|
|
- //
|
|
|
- apply() {
|
|
|
- if (!this.formdata.applyNote) {
|
|
|
- this.$toast('缺少必要参数,请检查')
|
|
|
- return
|
|
|
- }
|
|
|
- this.disabled = true
|
|
|
- let params = {
|
|
|
- ...this.formdata,
|
|
|
- orderId: this.orderId,
|
|
|
- refundFile: this.fileurl.toString()
|
|
|
+ .then(res => {
|
|
|
+ this.form = res.data
|
|
|
+ this.fileList = res.data.orderRefundFileList.map(v => v.imgUrl)
|
|
|
+ if (['AFTER_WAIT', 'REFUND', 'NO_REFUND'].indexOf(res.data.status) !== -1) {
|
|
|
+ this.showDisable = true
|
|
|
}
|
|
|
- this.$toast('正在申请售后中...')
|
|
|
- setTimeout(() => {
|
|
|
- this.$api
|
|
|
- .postJson('/refundOrder/apply', params)
|
|
|
- .then(res => {
|
|
|
- this.disabled = false
|
|
|
- this.$navToPage({
|
|
|
- url: '/pages/mine/myBuy/list'
|
|
|
- },
|
|
|
- 'redirectTo'
|
|
|
- )
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- this.disabled = false
|
|
|
- })
|
|
|
- }, 1000)
|
|
|
- },
|
|
|
- //
|
|
|
- getDetail() {
|
|
|
- this.$api
|
|
|
- .postJson('/refundOrder/detail', {
|
|
|
- orderId: this.orderId
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- this.form = res.data
|
|
|
- this.fileList = res.data.orderRefundFileList.map(v => v.imgUrl)
|
|
|
- if (['AFTER_WAIT', 'REFUND', 'NO_REFUND'].indexOf(res.data.status) !== -1) {
|
|
|
- this.showDisable = true
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {})
|
|
|
- .finally(() => {
|
|
|
- this.refresherTriggered = false
|
|
|
- })
|
|
|
- },
|
|
|
- refresherrefresh() {
|
|
|
- this.refresherTriggered = true
|
|
|
- this.getDetail()
|
|
|
- }
|
|
|
- }
|
|
|
- // #endif
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.refresherTriggered = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ refresherrefresh() {
|
|
|
+ this.refresherTriggered = true
|
|
|
+ this.getDetail()
|
|
|
}
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .goods-container {
|
|
|
- background: #ffffff;
|
|
|
- margin-top: 30rpx;
|
|
|
- padding: 30rpx 30rpx 0;
|
|
|
-
|
|
|
- .title {
|
|
|
- font-weight: 500;
|
|
|
+.goods-container {
|
|
|
+ background: #ffffff;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ padding: 30rpx 30rpx 0;
|
|
|
+ .title {
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .goods {
|
|
|
+ display: flex;
|
|
|
+ padding: 30rpx 0;
|
|
|
+ image {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
}
|
|
|
-
|
|
|
- .goods {
|
|
|
- display: flex;
|
|
|
- padding: 30rpx 0;
|
|
|
-
|
|
|
- image {
|
|
|
- width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
+ .main {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ .name {
|
|
|
+ font-size: 32rpx;
|
|
|
}
|
|
|
-
|
|
|
- .main {
|
|
|
- flex: 1;
|
|
|
- margin-left: 20rpx;
|
|
|
-
|
|
|
- .name {
|
|
|
+ .des {
|
|
|
+ margin-top: 12rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $reg-font;
|
|
|
+ }
|
|
|
+ .price {
|
|
|
+ margin-top: 12rpx;
|
|
|
+ text {
|
|
|
+ color: $assist-color;
|
|
|
+ font-weight: 500;
|
|
|
font-size: 32rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .des {
|
|
|
- margin-top: 12rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: $reg-font;
|
|
|
- }
|
|
|
-
|
|
|
- .price {
|
|
|
- margin-top: 12rpx;
|
|
|
-
|
|
|
- text {
|
|
|
- color: $assist-color;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 32rpx;
|
|
|
- margin-right: 12rpx;
|
|
|
- }
|
|
|
+ margin-right: 12rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .total {
|
|
|
- border-top: 1px solid #eaeaea;
|
|
|
- height: 80rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: end;
|
|
|
- font-size: 28rpx;
|
|
|
-
|
|
|
- text {
|
|
|
- margin-left: 12rpx;
|
|
|
- color: $assist-color;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .total {
|
|
|
+ border-top: 1px solid #eaeaea;
|
|
|
+ height: 80rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: end;
|
|
|
+ font-size: 28rpx;
|
|
|
+ text {
|
|
|
+ margin-left: 12rpx;
|
|
|
+ color: $assist-color;
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
|
|
|
- .form-container {
|
|
|
- background: #ffffff;
|
|
|
+.form-container {
|
|
|
+ background: #ffffff;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ padding: 30rpx;
|
|
|
+ .title {
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .label {
|
|
|
+ color: $sec-font;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-right: 30rpx;
|
|
|
+ }
|
|
|
+ .radio {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
margin-top: 30rpx;
|
|
|
- padding: 30rpx;
|
|
|
-
|
|
|
- .title {
|
|
|
- font-weight: 500;
|
|
|
- }
|
|
|
-
|
|
|
- .label {
|
|
|
- color: $sec-font;
|
|
|
- flex-shrink: 0;
|
|
|
- margin-right: 30rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .radio {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-top: 30rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .content {
|
|
|
- display: flex;
|
|
|
- margin-top: 30rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .row {
|
|
|
- display: flex;
|
|
|
- margin-top: 30rpx;
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
- .bottom-container {
|
|
|
- padding: 20rpx 30rpx;
|
|
|
+ .content {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 30rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.bottom-container {
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+}
|
|
|
+</style>
|