|
|
@ -7,29 +7,31 @@ |
|
|
|
<!-- 商品简介 --> |
|
|
|
<view class="itme1" @click="openSpPopup"> |
|
|
|
<view class="left"> |
|
|
|
<image src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode="aspectFill"/> |
|
|
|
<image :src="commodity.goodsPic" mode="aspectFill" /> |
|
|
|
</view> |
|
|
|
<view class="center"> |
|
|
|
<view>{{ commodity.title }}</view> |
|
|
|
<view>{{ commodity.smallTitle }}</view> |
|
|
|
<view>{{ commodity.goodsName }}</view> |
|
|
|
<view>商品规格:{{ commodity.sku }}</view> |
|
|
|
<view>下单时间:{{ commodity.startTime }}</view> |
|
|
|
</view> |
|
|
|
<view class="right">×{{ commodity.total }}</view> |
|
|
|
<view class="right">×{{ commodity.num }}</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!--<commoditySelect ></commoditySelect>--> |
|
|
|
<!-- 暂未选择商品的时候 --> |
|
|
|
<!-- <view v-else style="height: 200rpx;;display: flex;justify-content: center;align-items: center;font-size: 36px;"> |
|
|
|
请选择商品... |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- 申请类型&申请原因 --> |
|
|
|
<view class="item2"> |
|
|
|
<view class="type"> |
|
|
|
<span>申请类型</span> |
|
|
|
<span>退货退款</span> |
|
|
|
<span>{{ titleIndex == 0?'退货退款':'换货'}}</span> |
|
|
|
</view> |
|
|
|
<uv-line></uv-line> |
|
|
|
<view class="reason"> |
|
|
|
<view>申请原因</view> |
|
|
|
<view> |
|
|
|
<uv-input placeholder="请输入申请原因" border="none" clearable></uv-input> |
|
|
|
<uv-input v-model="form.reason" placeholder="请输入申请原因" border="none" clearable></uv-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -39,14 +41,14 @@ |
|
|
|
<view class="type"> |
|
|
|
<span>{{ titleIndex == 0 ? '退货数量' : '换货数量' }}</span> |
|
|
|
<span> |
|
|
|
<uv-number-box :min="1" :max="100"></uv-number-box> |
|
|
|
<uv-number-box v-model="form.refundNum" :min="1" :max="commodity.num"></uv-number-box> |
|
|
|
</span> |
|
|
|
</view> |
|
|
|
<uv-line v-if='titleIndex == 0 ? true :false'></uv-line> |
|
|
|
<view class="reason" v-if='titleIndex == 0 ? true :false'> |
|
|
|
<view>申请原因</view> |
|
|
|
<view>申请金额</view> |
|
|
|
<view> |
|
|
|
<uv-input disabled placeholder="$" border="none" clearable></uv-input> |
|
|
|
<uv-input v-model="form.reasonPrice" disabled border="none" clearable></uv-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -55,7 +57,7 @@ |
|
|
|
<view class="item4"> |
|
|
|
<view>申请说明(选填)</view> |
|
|
|
<view> |
|
|
|
<uv-input placeholder="请您详细填写申请说明" border="none" clearable></uv-input> |
|
|
|
<uv-input v-model="form.reasonInfo" placeholder="请您详细填写申请说明" border="none" clearable></uv-input> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<uv-upload :fileList="fileList" :maxCount="5" multiple width="150rpx" height="150rpx" |
|
|
@ -69,7 +71,7 @@ |
|
|
|
<view class="phone"> |
|
|
|
<view>联系电话</view> |
|
|
|
<view> |
|
|
|
<uv-input placeholder="请输入联系电话" border="none" clearable></uv-input> |
|
|
|
<uv-input v-model="form.phone" placeholder="请输入联系电话" border="none" clearable></uv-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -83,7 +85,7 @@ |
|
|
|
|
|
|
|
<!--商品选择--> |
|
|
|
<uv-popup ref="spPopup" :round="30"> |
|
|
|
<commoditySelect height="60vh" @selectSp="selectCommodity" ref="commoditySelect"/> |
|
|
|
<commoditySelect height="60vh" @selectSp="selectCommodity" ref="commoditySelect" /> |
|
|
|
</uv-popup> |
|
|
|
|
|
|
|
</view> |
|
|
@ -104,7 +106,7 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
titleIndex: 0, |
|
|
|
title: ['申请换货', '申请退货'], |
|
|
|
title: ['申请退货', '申请换货'], |
|
|
|
fileList: [], |
|
|
|
bottomBtnStyle: { |
|
|
|
color: '#FFF', |
|
|
@ -117,14 +119,25 @@ |
|
|
|
bottom: '40rpx' |
|
|
|
}, |
|
|
|
commodity: { |
|
|
|
title: '商品名称', |
|
|
|
smallTitle: '产品规格:120*4*75【桌子尺寸】', |
|
|
|
total: 1, |
|
|
|
goodsName: '', |
|
|
|
sku: '', |
|
|
|
num: 0, |
|
|
|
startTime: '', |
|
|
|
goodsPic: '', |
|
|
|
}, |
|
|
|
form: { |
|
|
|
id: "", |
|
|
|
phone: "", |
|
|
|
reason: "", |
|
|
|
reasonInfo: "", |
|
|
|
reasonPic: "", |
|
|
|
reasonPrice: "", |
|
|
|
refundNum: "", |
|
|
|
type: '', //0退货 1换货 |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
console.log("==="); |
|
|
|
this.$refs.commoditySelect.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -136,12 +149,33 @@ |
|
|
|
// 选择退换货商品回调 |
|
|
|
selectCommodity(e) { |
|
|
|
console.log(e, "selectCommodity--e") |
|
|
|
console.log(e.id, 'e.id'); |
|
|
|
this.form.id = e.id //设置租赁ID |
|
|
|
this.form.reasonPrice = e.price //设置退款金额(押金) |
|
|
|
this.form.refundNum = e.num //设置数量 |
|
|
|
this.commodity = e |
|
|
|
this.$refs.spPopup.close() |
|
|
|
}, |
|
|
|
|
|
|
|
//确认退换货 |
|
|
|
confirm() { |
|
|
|
console.log("==="); |
|
|
|
this.form.type = this.titleIndex |
|
|
|
this.form.reasonPic = this.fileList.map(item=>item.url).join(",") |
|
|
|
console.log(this.form, "form"); |
|
|
|
|
|
|
|
this.$api('refundOrder', this.form, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.showToast({ |
|
|
|
icon: "success", |
|
|
|
title: "申请成功" |
|
|
|
}) |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/center' |
|
|
|
}) |
|
|
|
}, 3000) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteImage(e) { |
|
|
|
this.fileList.splice(e.index, 1) |
|
|
@ -180,15 +214,16 @@ |
|
|
|
display: flex; |
|
|
|
height: 200rpx; |
|
|
|
background-color: #ffffff; |
|
|
|
|
|
|
|
|
|
|
|
.left { |
|
|
|
padding: 20rpx; |
|
|
|
width: 150rpx; |
|
|
|
height: 150rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
background-color: #ffffff; |
|
|
|
flex-shrink: 0; |
|
|
|
image{ |
|
|
|
|
|
|
|
image { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
border-radius: 20rpx; |
|
|
@ -215,6 +250,12 @@ |
|
|
|
font-size: 28rpx; |
|
|
|
color: #666666; |
|
|
|
} |
|
|
|
|
|
|
|
// 给第三个 view 设置样式 |
|
|
|
>view:nth-of-type(3) { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #666666; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.right { |
|
|
|