|
|
@@ -11,21 +11,26 @@
|
|
|
|
|
|
<view class="content">
|
|
|
<view class="productPrice">
|
|
|
- <view style="display:flex;">
|
|
|
+ <view style="display:flex;" v-if="orderInfo">
|
|
|
<view>
|
|
|
- <image style="width: 120rpx;height: 120rpx;" src="@/static/points/closeIcon.png" mode="">
|
|
|
+ <image style="width: 120rpx;height: 120rpx;"
|
|
|
+ :src="$globalData.publicUrl + productInfo.skuImage" mode="">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view
|
|
|
style="margin-left: 24rpx;display: flex;flex-direction: column;justify-content: space-between;">
|
|
|
- <view class="name">实付价 ¥10元+1000积分 </view>
|
|
|
- <view class="spec">已选:大号,白色 </view>
|
|
|
+ <view class="name">实付价{{ productInfo.paymentType == 1 ? orderInfo.pointsUsed + '积分' :
|
|
|
+ productInfo.paymentType == 2 ? '¥' + orderInfo.payAmount + '元' :
|
|
|
+ productInfo.paymentType == 3 ? '¥' + orderInfo.payAmount + '元' + '+' +
|
|
|
+ orderInfo.pointsUsed + '积分' : null }} </view>
|
|
|
+ <view class="spec">已选:{{ skuSpecFun(productInfo.skuSpec) }} </view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="mustInput">
|
|
|
<u--form>
|
|
|
- <u-form-item required label="申请原因" label-width="58" prop="selectReasonValue">
|
|
|
+ <u-form-item required label="申请原因" label-width="120rpx" prop="selectReasonValue">
|
|
|
<view class="tip">
|
|
|
<view :style="{ color: selectReasonValue ? '#333' : '#999' }">{{
|
|
|
selectReasonValue !== null ? selectReasonValue : '请选择申请原因' }}</view>
|
|
|
@@ -35,9 +40,10 @@
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item required label="问题描述/凭证" label-width="86" prop="selectReasonValue">
|
|
|
+ <u-form-item required label="问题描述/凭证" label-width="181rpx" prop="selectReasonValue">
|
|
|
<view class="tip">
|
|
|
- <view :style="{ color: questionOrDiscribeValue ? '#333' : '#999' }" class="questionOrDiscribeValue">
|
|
|
+ <view :style="{ color: questionOrDiscribeValue ? '#333' : '#999' }"
|
|
|
+ class="questionOrDiscribeValue">
|
|
|
{{ questionOrDiscribeValue ? questionOrDiscribeValue : '请您务必上传描述和凭证' }}</view>
|
|
|
<image style="width: 28rpx;height: 28rpx;margin-left: 8rpx;"
|
|
|
@click="selectApplyReasonFun('2')" src="@/static/points/Keyboard_arrow_rifht.png"
|
|
|
@@ -77,32 +83,39 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { afterSaleOrder} from '@/api/pointOrder'
|
|
|
-
|
|
|
+import { afterSaleOrder, getPointOrderInfo } from '@/api/pointOrder'
|
|
|
export default {
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- orderNo:null,
|
|
|
- orderId:null,
|
|
|
- orderStatus:null,
|
|
|
+ orderNo: null,
|
|
|
+ orderId: null,
|
|
|
+ orderStatus: null,
|
|
|
+ afterSalesType: null,
|
|
|
+ receiptStatus: null,
|
|
|
fileList: [],
|
|
|
questionOrDiscribeValue: null,
|
|
|
selectReasonValue: null,
|
|
|
isTop: 0,
|
|
|
redemptionRulesShowPopup: false,
|
|
|
selectProductShowPopup: false,
|
|
|
+ orderInfo: null,
|
|
|
+ productInfo: null,
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad(data) {
|
|
|
if (data) {
|
|
|
- console.log(data,'66666666')
|
|
|
+ console.log(data, '66666666')
|
|
|
//decodeURIComponent (data)
|
|
|
- if(data.orderId)this.orderId=data.orderId
|
|
|
- if(data.orderNo)this.orderNo=data.orderNo
|
|
|
- if(data.orderStatus)this.orderStatus=data.orderStatus
|
|
|
+ if (data.orderId) this.orderId = data.orderId
|
|
|
+ if (data.orderNo) this.orderNo = data.orderNo
|
|
|
+ this.getOrderInfo();
|
|
|
+ if (data.orderStatus) this.orderStatus = data.orderStatus
|
|
|
+ if (data.receiptStatus) this.receiptStatus = data.receiptStatus
|
|
|
+ if (data.afterSalesType) this.afterSalesType = data.afterSalesType
|
|
|
+
|
|
|
if (data.questionOrDiscribeValue && data.questionOrDiscribeValue !== "null" && data.questionOrDiscribeValue !== "") {
|
|
|
this.questionOrDiscribeValue = data.questionOrDiscribeValue
|
|
|
}
|
|
|
@@ -114,9 +127,6 @@ export default {
|
|
|
if (data.selectReasonValue && data.selectReasonValue !== "null") {
|
|
|
this.selectReasonValue = data.selectReasonValue
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -128,21 +138,41 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ //规则组装
|
|
|
+ skuSpecFun(skuSpec) {
|
|
|
+ if (!skuSpec) return ''
|
|
|
+ return JSON.parse(skuSpec).map(e => e.specValue).join(',')
|
|
|
+
|
|
|
+ },
|
|
|
+ async getOrderInfo() {
|
|
|
+ const res = await getPointOrderInfo({
|
|
|
+ orderNo: this.orderNo,
|
|
|
+ openId: uni.getStorageSync('wx_copenid')
|
|
|
+ })
|
|
|
+ this.orderInfo = res.data.data.orderInfo
|
|
|
+ this.productInfo = res.data.data.productInfo
|
|
|
+ },
|
|
|
//提交
|
|
|
async goSubmit() {
|
|
|
if (!this.selectReasonValue || !this.questionOrDiscribeValue || this.fileList.length === 0) {
|
|
|
- uni.$u.toast('请选择申请原因\n或\n请上传描述/凭证')
|
|
|
+ uni.$u.toast('请选择申请原因\n或\n请上传描述/凭证')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
afterSaleOrder({ //换货
|
|
|
- orderId:this.orderId,
|
|
|
- orderNo:this.orderNo,
|
|
|
- applyReason:this.selectReasonValue,
|
|
|
- afterSaleType:2,//1:退货 2:换 3:未收到货
|
|
|
- applyDesc:this.questionOrDiscribeValue,
|
|
|
- applyImages:this.fileList.map(m=>m.url).join(','),
|
|
|
- }).then(res=>{
|
|
|
+ orderId: this.orderId,
|
|
|
+ orderNo: this.orderNo,
|
|
|
+ applyReason: this.selectReasonValue,
|
|
|
+ afterSaleType: 2,//1:退货 2:换 3:未收到货
|
|
|
+ applyDesc: this.questionOrDiscribeValue,
|
|
|
+ applyImages: this.fileList.map(m => m.url).join(','),
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/points/order/orderDetails?orderNo=' + this.orderNo,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.$u.toast(res.data.msg)
|
|
|
+ }
|
|
|
|
|
|
})
|
|
|
|
|
|
@@ -155,7 +185,7 @@ export default {
|
|
|
//选择申请原因--换货
|
|
|
selectApplyReasonFun(tab) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/points/productDetails/applyRefund?tab=${tab}&selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}&orderStatus=${this.orderStatus}`
|
|
|
+ url: `/points/productDetails/applyRefund?afterSalesType=${this.afterSalesType}&receiptStatus=${this.receiptStatus}&tab=${tab}&selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}&orderStatus=${this.orderStatus}`
|
|
|
})
|
|
|
|
|
|
},
|
|
|
@@ -258,9 +288,10 @@ export default {
|
|
|
.u-form-item__body__right {
|
|
|
flex: none;
|
|
|
}
|
|
|
- .questionOrDiscribeValue{
|
|
|
+
|
|
|
+ .questionOrDiscribeValue {
|
|
|
width: 400rpx;
|
|
|
- white-space:nowrap;
|
|
|
+ white-space: nowrap;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
text-align: right;
|