[新增退款流程、查看物流]

This commit is contained in:
2023-11-01 17:08:36 +08:00
parent 9acf8137af
commit a3ee59adda
29 changed files with 1391 additions and 190 deletions

View File

@@ -35,16 +35,56 @@ const goodsSign = (order_no) => req({
}) })
// 快递100-免费 // 快递100-免费
const kuaiDi = (data) => req({ // const kuaiDi = (data) => req({
url : "mall/orders/express", // url : "mall/orders/express",
// data: data
// })
// 快递100-花钱
const kuaiDi = (order_no) => req({
url : "mall/orders/" + order_no + "/logistic"
})
// 退款售后列表
const refundList = data => req({
url : "mall/refunds",
data: data data: data
}) })
// 退款售后详情
const refundSee = (refund) => req({
url : "mall/refunds/" + refund
})
// 退货
const refundPost = (order_no, data) => req({
url : "mall/orders/" + order_no + "/refund",
data: data,
method: "POST"
})
// 获取退货信息
const reason = (order_no) => req({
url : "mall/orders/" + order_no + "/refund"
})
// 用户退货
const refundDeliver = (refund_no, data) => req({
url : "mall/refunds/" + refund_no + "/deliver",
data: data,
method: "POST"
})
export default ({ export default ({
list, list,
goodsDet, goodsDet,
goodsCancel, goodsCancel,
goodsDel, goodsDel,
goodsSign, goodsSign,
kuaiDi kuaiDi,
refundList,
refundSee,
refundPost,
reason,
refundDeliver
}) })

View File

@@ -43,7 +43,11 @@
"pages/water/waterOrder/waterOrder", "pages/water/waterOrder/waterOrder",
"pages/water/details/details", "pages/water/details/details",
"pages/water/logistic/logistic", "pages/water/logistic/logistic",
"pages/recruit/poster/poster" "pages/recruit/poster/poster",
"pages/order/refund/refund",
"pages/order/refundForm/refundForm",
"pages/order/refundInfo/refundInfo",
"pages/order/refundWrite/refundWrite"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
@@ -56,36 +60,36 @@
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "首页", "text": "首页",
"iconPath": "/static/festival/tabBar_00.png", "iconPath": "/static/tabBarIcon/tabBar_00.png",
"selectedIconPath": "/static/festival/tabBar_selected_00.png" "selectedIconPath": "/static/tabBarIcon/tabBar_selected_00.png"
}, },
{ {
"pagePath": "pages/mall/index", "pagePath": "pages/mall/index",
"text": "产品", "text": "产品",
"iconPath": "/static/festival/tabBar_01.png", "iconPath": "/static/tabBarIcon/tabBar_01.png",
"selectedIconPath": "/static/festival/tabBar_selected_01.png" "selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png"
}, },
{ {
"pagePath": "pages/recruit/index", "pagePath": "pages/recruit/index",
"text": "体验官", "text": "体验官",
"iconPath": "/static/festival/tabBar_02.png", "iconPath": "/static/tabBarIcon/tabBar_04.png",
"selectedIconPath": "/static/festival/tabBar_selected_02.png" "selectedIconPath": "/static/tabBarIcon/tabBar_selected_04.png"
}, },
{ {
"pagePath": "pages/report/index", "pagePath": "pages/report/index",
"text": "报告", "text": "报告",
"iconPath": "/static/festival/tabBar_03.png", "iconPath": "/static/tabBarIcon/tabBar_02.png",
"selectedIconPath": "/static/festival/tabBar_selected_03.png" "selectedIconPath": "/static/tabBarIcon/tabBar_selected_02.png"
}, },
{ {
"pagePath": "pages/user/index", "pagePath": "pages/user/index",
"text": "我的", "text": "我的",
"iconPath": "/static/festival/tabBar_04.png", "iconPath": "/static/tabBarIcon/tabBar_03.png",
"selectedIconPath": "/static/festival/tabBar_selected_04.png" "selectedIconPath": "/static/tabBarIcon/tabBar_selected_03.png"
} }
], ],
"color": "#999999", "color": "#999999",
"selectedColor": "#000000", "selectedColor": "#3b7cff",
"borderStyle": "white" "borderStyle": "white"
}, },
"style": "v2", "style": "v2",

View File

@@ -68,6 +68,15 @@ Page({
content : '是否签收', content : '是否签收',
success : res=> { success : res=> {
if (res.confirm) { if (res.confirm) {
//拉起确认收货组件
if (wx.openBusinessView) {
wx.openBusinessView({
businessType: 'weappOrderConfirm',
extraData: {
merchant_id: this.data.goodsData.payment.mch_id,
merchant_trade_no: this.data.goodsData.payment.trade_id
},
success: ()=> {
wx.$api.order.goodsSign(this.data.goodsData.order_no).then(res => { wx.$api.order.goodsSign(this.data.goodsData.order_no).then(res => {
wx.showToast({ wx.showToast({
title:'签收成功', title:'签收成功',
@@ -77,6 +86,24 @@ Page({
// 获取订单详情 // 获取订单详情
this.goodsInfo(); this.goodsInfo();
}).catch(err => {}) }).catch(err => {})
},
fail: ()=> {
wx.showToast({
title:'取消收货',
icon:'none'
})
},
complete: ()=> {
console.log('complete')
},
});
} else {
//引导用户升级微信版本
wx.showToast({
title:'请升级微信版本',
icon:'none'
})
}
} }
} }
}) })
@@ -125,7 +152,14 @@ Page({
// wx.navigateTo({ // wx.navigateTo({
// url: '/pages/mall/webView/webView?url=' + this.data.goodsData.express.url, // url: '/pages/mall/webView/webView?url=' + this.data.goodsData.express.url,
// }) // })
var data = JSON.stringify(this.data.goodsData.express) // 免费的
// var data = JSON.stringify(this.data.goodsData.express)
// wx.navigateTo({
// url: `../logistic/logistic?newData=` + encodeURIComponent(data)
// })
// 花钱的
var data = JSON.stringify(this.data.goodsData.order_no)
wx.navigateTo({ wx.navigateTo({
url: `../logistic/logistic?newData=` + encodeURIComponent(data) url: `../logistic/logistic?newData=` + encodeURIComponent(data)
}) })

View File

@@ -97,11 +97,23 @@ Page({
* 订单签收 * 订单签收
*/ */
signClick(e) { signClick(e) {
console.log(e.currentTarget.dataset)
let payment = e.currentTarget.dataset.payment,
orderNo = e.currentTarget.dataset.order_no
wx.showModal({ wx.showModal({
title : '提示', title : '提示',
content : '是否签收', content : '是否签收',
success : res=> { success : res=> {
if (res.confirm) { if (res.confirm) {
//拉起确认收货组件
if (wx.openBusinessView) {
wx.openBusinessView({
businessType: 'weappOrderConfirm',
extraData: {
merchant_id: payment.mch_id,
merchant_trade_no: payment.trade_id
},
success: ()=> {
wx.$api.order.goodsSign(e.currentTarget.dataset.order_no).then(res => { wx.$api.order.goodsSign(e.currentTarget.dataset.order_no).then(res => {
wx.showToast({ wx.showToast({
title:'签收成功', title:'签收成功',
@@ -111,8 +123,35 @@ Page({
// 获取订单列表 // 获取订单列表
this.listInfo() this.listInfo()
}).catch(err => {}) }).catch(err => {})
},
fail: ()=> {
wx.showToast({
title:'取消收货',
icon:'none'
})
},
complete: ()=> {
console.log('complete')
},
});
} else {
//引导用户升级微信版本
wx.showToast({
title:'请升级微信版本',
icon:'none'
})
} }
} }
}
})
},
/**
* 退货售后
*/
refundClick(no){
wx.navigateTo({
url: '/pages/order/refundForm/refundForm?order_no=' + no.currentTarget.dataset.order_no
}) })
}, },

View File

@@ -45,7 +45,8 @@
</view> </view>
<view class="list-btn"> <view class="list-btn">
<view class="list-btn-labor" bindtap="payClick" data-order_no="{{item.order_no}}" data-total="{{item.total}}" wx:if="{{item.can.pay}}">立即付款</view> <view class="list-btn-labor" bindtap="payClick" data-order_no="{{item.order_no}}" data-total="{{item.total}}" wx:if="{{item.can.pay}}">立即付款</view>
<view bindtap="signClick" data-order_no="{{item.order_no}}" class="list-btn-labor" wx:if="{{item.can.sign}}">签收订单</view> <view bindtap="signClick" data-order_no="{{item.order_no}}" data-payment="{{item.payment}}" class="list-btn-labor" wx:if="{{item.can.sign}}">签收订单</view>
<view bindtap="refundClick" data-order_no="{{item.order_no}}" class="list-btn-labor" wx:if="{{item.can.refund}}">退款售后</view>
<navigator hover-class="none" url="./details/details?order_no={{item.order_no}}" class="list-btn-labor grey">查看详情</navigator> <navigator hover-class="none" url="./details/details?order_no={{item.order_no}}" class="list-btn-labor grey">查看详情</navigator>
</view> </view>
</view> </view>

View File

@@ -7,6 +7,7 @@ Page({
data: { data: {
logisticArr : [], logisticArr : [],
expressData : '', expressData : '',
orderExpress: ''
}, },
onLoad(options) { onLoad(options) {
@@ -14,6 +15,7 @@ Page({
newData = {} newData = {}
} = options; } = options;
const data = JSON.parse(decodeURIComponent(newData)); const data = JSON.parse(decodeURIComponent(newData));
this.setData({ this.setData({
expressData: data expressData: data
}) })
@@ -26,9 +28,10 @@ Page({
// 查看物流 // 查看物流
h5url() { h5url() {
wx.$api.order.kuaiDi({express_no: this.data.expressData.express_no}).then(res => { wx.$api.order.kuaiDi(this.data.expressData).then(res => {
this.setData({ this.setData({
logisticArr: res.data.data logisticArr : res.data.logistics,
orderExpress: res.data.orderExpress
}) })
}).catch(err => {}) }).catch(err => {})
// wx.request({ // wx.request({

View File

@@ -1,17 +1,18 @@
<block wx:if="{{logisticArr.length > 0}}"> <block wx:if="{{logisticArr.length > 0}}">
<view class="top"> <view class="top">
<view class="top-logo"> <view class="top-logo">
<image src="{{expressData.express_cover}}" mode="aspectFill"></image> <image src="{{orderExpress.logistic_cover}}" mode="aspectFill"></image>
</view> </view>
<view class="top-cont"> <view class="top-cont">
<view class="top-name"> <view class="top-name">
{{expressData.express_name}} {{orderExpress.logistic_name}}
<view class="top-no"> <view class="top-no">
{{expressData.express_no}} {{orderExpress.express_no}}
</view> </view>
</view> </view>
<view class="top-type"> <view class="top-type">
{{expressData.name}}<text>{{expressData.mobile}}</text> {{orderExpress.order_state}}
<!-- <text>{{orderExpress.mobile}}</text> -->
</view> </view>
</view> </view>
</view> </view>
@@ -21,7 +22,7 @@
</view> </view>
<view class="address-text"> <view class="address-text">
{{expressData.full_address}} {{orderExpress.address}}
</view> </view>
</view> </view>
<view class="list"> <view class="list">

View File

@@ -0,0 +1,88 @@
/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
/**
* 页面的初始数据
*/
data: {
listType : 'refunding', //refunding 处理中 refunded 已完成
listsArr : [], // 订单列表
page : {}, // 分页信息
lodingStats : false,// 加载状态
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 获取订单列表
this.listInfo()
},
/**
* 订单列表
*/
listInfo(page) {
wx.$api.order.refundList({
state: this.data.listType,
page : page || 1
}).then(res => {
let listArr = this.data.listsArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data.data)
this.setData({
listsArr : newData,
page : res.data.page,
lodingStats : false
})
wx.stopPullDownRefresh()
}).catch(err => {})
},
/**
* 状态筛选
*/
onTabs(val){
if(this.data.listType === val) return
this.setData({
listType: val.currentTarget.dataset.type
})
// 获取订单列表
this.listInfo()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
// 获取订单列表
this.listInfo();
},
/**
* 上拉加载
*/
onReachBottom(){
this.setData({
lodingStats: true
})
let pageNumber = this.data.page.current
if(this.data.page.has_more){
pageNumber++
// 获取订单列表
this.listInfo(pageNumber);
}
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,48 @@
<view class="header">
<view class="tabs">
<view class="tabs-item {{listType == 'refunding' ? 'show' : ''}}" bindtap="onTabs" data-type="refunding">处理中</view>
<view class="tabs-item {{listType == 'refunded' ? 'show' : ''}}" bindtap="onTabs" data-type="refunded">已完成</view>
</view>
</view>
<view class="order-content" wx:if="{{listsArr.length > 0}}">
<view class="order-content-li" wx:for="{{listsArr}}" wx:key="listsArr">
<view class="order-store">
<view class="order-store-title nowrap">
<image src="https://storage.funnyzhibo.com/images/2020/05/06/shop_icon.png"></image>
{{item.shop.name}}
</view>
<view class="order-store-stateText">
<image src="https://storage.funnyzhibo.com/images/2020/05/20/refund_icon.png"></image>
{{item.state.text}}
</view>
</view>
<navigator wx:for="{{item.items}}" wx:key="items" wx:for-item="items" class="order-goods" hover-class="none"
url="/pages/refund_details/refund_details?id={{item.orderid}}">
<image class="order-goods-cover" src="{{items.cover}}" mode="aspectFill"></image>
<view class="order-goods-content">
<view class="order-goods-content-name nowrap">{{items.goods_name}}</view>
<view class="order-goods-content-size nowrap">数量:{{items.qty}}</view>
<view class="order-goods-content-price nowrap">
产品价格:¥{{items.price}}
</view>
</view>
</navigator>
<view class="order-total">
退款总额
<text>退款 ¥{{item.refund_total}} 元</text>
</view>
<view class="order-btns">
<navigator class="order-btn" hover-class="none" url="/pages/order/refundInfo/refundInfo?refund_no={{item.refund_no}}">查看详情
</navigator>
<navigator class="order-btn order-btn-back" hover-class="none" url="/pages/order/refundWrite/refundWrite?refund_no={{item.refund_no}}" wx:if="{{item.can.deliver}}">我要退货
</navigator>
</view>
</view>
</view>
<!-- 为空 -->
<view class="pack-center pages-hint" wx:else>
<image src="/static/imgs/text_null.png"></image>
<view>暂无数据</view>
</view>

View File

@@ -0,0 +1,154 @@
page {
background-color: #f7faff;
}
/* tabs */
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
height: 100rpx;
background-color: #f7faff;
}
.tabs {
display: flex;
justify-content: space-around;
padding: 30rpx 10rpx;
font-size: 30rpx;
color: #3c3d3e;
}
.tabs-item.show {
color: #3b7cff;
}
/* 订单列表 */
.order-content {
padding: 0 30rpx;
box-sizing: border-box;
margin-top: 100rpx;
}
.order-content-li{
background: white;
padding: 30rpx;
}
.order-store{
padding-bottom: 30rpx;
margin-bottom: 10rpx;
border-bottom: solid 1rpx #f5f6fa;
display: flex;
}
.order-store-stateText{
color: #e92344;
font-size: 26rpx;
display: flex;
}
.order-store-stateText image, .order-store-title image {
width: 32rpx;
height: 32rpx;
margin: 2rpx 10rpx 0 0;
}
.order-store-title{
flex: 1;
display: flex;
}
.order-store-title image {
margin-top: 7rpx;
}
.order-store-orderid{
color: #747788;
font-size: 25rpx;
}
.order-store-title text{
color: white;
font-size: 24rpx;
background: #e92344;
margin-right: 10rpx;
padding: 0 10rpx;
}
.order-goods{
padding-top: 20rpx;
position: relative;
}
.order-goods-cover{
width: 160rpx;
height: 160rpx;
vertical-align: top;
border-radius: 10rpx;
}
.order-goods-content{
position: absolute;
left: 190rpx;
top: 20rpx;
right: 20rpx;
width: calc(100% - 190rpx);
}
.order-goods-content-size{
color: #9a9a9a;
font-size: 26rpx;
margin: 15rpx 0 25rpx;
}
.order-goods-content-price{
font-size: 24rpx;
color: #313131;
}
.order-total{
padding: 10rpx 20rpx 10rpx 30rpx;
font-size: 26rpx;
line-height: 50rpx;
border-radius: 10rpx;
color: #313131;
display: flex;
background: #f7f7f7;
margin: 20rpx 0;
font-weight: 600;
}
.order-total text{
padding-left: 30rpx;
font-weight: normal;
color: #e92344;
}
.order-btns{
font-size: 28rpx;
display: flex;
border-top: solid 1rpx #f5f6fa;
padding-top: 30rpx;
margin-top: 30rpx;
flex-wrap: wrap;
flex-direction:row-reverse;
}
.order-btn{
height: 64rpx;
line-height: 60rpx;
box-sizing: border-box;
border:solid 1rpx #747788;
padding: 0 20rpx;
border-radius: 30rpx;
margin-left: 30rpx;
}
.order-btn-back {
border-color: #e92344;
color: #e92344;
}

View File

@@ -0,0 +1,152 @@
/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
/**
* 页面的初始数据
*/
data: {
reasonArr : [],
reasonIndex: 0,
orderNo : '',
albumArr : [], //我的相册
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
this.setData({
orderNo: options.order_no
})
// 获取退款原因
this.reasonInfo(options.order_no)
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 退款原因
*/
reasonInfo(order_no) {
wx.$api.order.reason(order_no).then(res => {
this.setData({
reasonArr: res.data.title
})
}).catch(err => {})
},
/**
* 选择退款原因
*/
reasonChange(e) {
this.setData({
reasonIndex: e.detail.value
})
},
/**
* 上传图片
*/
addAlbum() {
wx.chooseImage({
count : 9,
success : path => {
// 上传图片
if (path.tempFilePaths){
let pathArr = path.tempFilePaths
for (let i = 0; i < pathArr.length; i++){
wx.$api.file.uploadImg(pathArr[i], {}).then(res=>{
wx.showLoading({
title: '上传中',
})
let albumArr = this.data.albumArr
albumArr.push({
path: res.path,
showpath: res.url
})
this.setData({
albumArr
})
wx.hideLoading()
})
if (i == pathArr.length - 1) {
wx.hideLoading()
}
}
}else{
wx.showToast({
title: '上传图片失败',
icon : 'none'
})
}
}
})
},
/**
* 删除图片
*/
removeAlbum(e){
wx.showLoading({
title: '加载中'
})
let index = e.currentTarget.dataset.index,
atalbum = this.data.albumArr
wx.showToast({
title: '删除成功',
icon : 'none'
})
atalbum.splice(index,1)
this.setData({
albumArr : atalbum
})
},
/**
* 提交表单
*/
siteform(e) {
let paths = []
for (let paht of this.data.albumArr){
paths.push(paht.path)
}
let value = e.detail.value
let data = {
remark : value.remark,
title : this.data.reasonIndex,
pictures : paths
}
this.setData({
disabled: true
})
wx.$api.order.refundPost(this.data.orderNo, data).then(() => {
wx.showToast({
title: '提交成功',
icon : 'none'
})
setTimeout(()=>{
wx.redirectTo({
url: '/pages/order/refund/refund',
})
},3000)
}).catch(() =>{
this.setData({
disabled: false
})
})
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,34 @@
<form bindsubmit="siteform" class="site-form">
<view class="site-input">
<label>退款原因</label>
<picker bindchange="reasonChange" value="{{reasonIndex}}" range="{{reasonArr}}" class="site-input-back">
<view class="picker">
{{ reasonArr[reasonIndex] }}
</view>
<image src="/static/icons/orderArrow.png"></image>
</picker>
</view>
<view class="site-input">
<label>退款说明</label>
<textarea placeholder="请输入退款说明" name="remark" rows="10" class="site-input-back"></textarea>
</view>
<view class="site-input">
<label>上传图片</label>
<view class="album-list">
<view class="album-list-li" wx:for="{{albumArr}}" wx:key="album" wx:for-index="removeIndex">
<image class="album-list-img" src="{{item.showpath}}" mode="aspectFill"></image>
<view class="album-remove" catchtap="removeAlbum" data-id="{{item.id}}" data-index="{{removeIndex}}">删除
</view>
</view>
<view class="album-list-li">
<view class="album-list-li-add" bindtap="addAlbum">
<image class="album-list-add-icon" src="/static/imgs/add_img.png"></image>
<view>添加</view>
</view>
</view>
</view>
</view>
<view class="site-btn">
<button form-type="submit" size="mini" disabled="{{disabled}}">确认提交</button>
</view>
</form>

View File

@@ -0,0 +1,106 @@
page {
background-color: #f4f4f6;
}
.site-input {
padding: 30rpx;
box-sizing: border-box;
}
.site-input label {
font-weight: 600;
}
.site-input-back {
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-top: 30rpx;
position: relative;
width: 100%;
}
.site-input-back image {
width: 44rpx;
height: 44rpx;
position: absolute;
right: 20rpx;
top: 25rpx;
}
.album-list {
display: flex;
padding: 20rpx 20rpx 20rpx 15rpx;
flex-wrap: wrap;
background-color: #fff;
margin-top: 30rpx;
border-radius: 10rpx;
}
.album-list-li {
position: relative;
width: 25%;
padding-top: calc(25% - 20rpx);
box-sizing: border-box;
border: solid 10rpx transparent;
}
.album-list-img,
.album-list-li-add {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f5f5f5;
border-radius: 6rpx;
}
.album-list-li-add {
text-align: center;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
color: #666;
font-size: 26rpx;
}
.album-list-add-icon {
width: 34rpx;
height: 34rpx;
}
.album-remove {
position: absolute;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, .5);
color: white;
font-size: 28rpx;
text-align: center;
line-height: 50rpx;
width: 100%;
z-index: 9;
}
.site-btn {
padding: 20rpx 30rpx;
margin-top: 6rpx;
}
.site-btn button[size="mini"] {
width: 100%;
background: #3b7cff;
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
color: white;
padding: 0;
}
.site-btn button[disabled] {
background: #7789ff !important;
color: #fff !important;
}

View File

@@ -0,0 +1,53 @@
/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
data: {
goodsData : '', //详情
canState : '', //操作按钮
express : '', //物流
refundNo : '' //订单号
},
onLoad(options) {
this.setData({
refundNo: options.refund_no
})
},
onShow() {
// 获取订单详情
this.goodsInfo();
},
/**
* 订单详情
*/
goodsInfo() {
wx.$api.order.refundSee(this.data.refundNo).then(res => {
console.log(res)
this.setData({
goodsData : res.data,
canState : res.data.can,
express : res.data.express
})
}).catch(err => {})
},
/**
* 复制订单号
*/
copyUrl(val) {
wx.setClipboardData({
data: val.currentTarget.dataset.no,
success: () => {
wx.showToast({
title: "订单编号复制成功",
icon : "none"
})
}
})
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,64 @@
<view class="orderData">
<view class="While">
<view class="orderData-cont-label">
<image class="orderData-cont-img" src="https://cdn.shuiganying.com/images/2023/04/04/3b3938e3a883e6b173b4d49a5242666a.png" mode="aspectFill"></image>
<view class="orderData-cont-text">
<view class="orderData-cont-name">订单编号</view>
<view class="orderData-cont-copy">
<text class="nowrap">{{goodsData.order_no}}</text>
<view bindtap="copyUrl" data-no="{{goodsData.order_no}}">复制</view>
</view>
</view>
</view>
<view class="orderData-cont-label">
<image class="orderData-cont-img" src="/static/icons/editIcon.png" mode="aspectFill"></image>
<view class="orderData-cont-text orderData-cont-site">
<view class="orderData-cont-name">{{ goodsData.log.state_text }}</view>
<view class="orderData-cont-copy">
退款原因:<text>{{ goodsData.log.remark }}</text>
</view>
</view>
</view>
</view>
<view class="While list-goods">
<block wx:for="{{goodsData.items}}" wx:key="items">
<image class="list-goods-img" mode="aspectFill" src="{{item.cover}}"></image>
<view class="list-goods-cont">
<view class="nowrap list-goods-name">{{item.goods_name}}</view>
<view class="list-goods-text">
<text>规格 99ml</text>x{{item.qty}}
</view>
<view class="list-goods-parice">
¥<text>{{item.price}}</text>
</view>
</view>
</block>
</view>
<view class="While reserveCont">
<view class="reserveCont-title">退款信息</view>
<view class="reserve-label">
<view class="reserve-name">操作时间</view>
<view class="reserve-text">{{goodsData.created_at}}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">退款状态</view>
<view class="reserve-text reserve-status">{{goodsData.state.text}}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">退款状态</view>
<view class="reserve-text">{{goodsData.state.remark}}</view>
</view>
<view class="reserve-label">
<view class="reserve-name">退款金额</view>
<view class="reserve-text reserve-price">¥{{goodsData.refund_total}}</view>
</view>
</view>
</view>
<view class="order-data-footer">
<view class="list-btn">
<view class="order-btn" bindtap="signClick" wx:if="{{canState.deliver}}">我要发货</view>
<navigator hover-class="none" class="order-btn grey" open-type="navigateBack">返回订单</navigator>
</view>
</view>

View File

@@ -0,0 +1,234 @@
page {
background: #f3f4f6;
padding: 30rpx;
box-sizing: border-box;
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
background-color: #FFFFFF;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .05);
}
.orderData {
border-bottom: 100rpx transparent solid;
}
/* 订单 */
.orderData-cont-label {
padding: 40rpx 30rpx;
display: flex;
box-sizing: border-box;
border-bottom: #f2f2f2 2rpx solid;
}
.orderData-cont-img {
width: 38rpx;
height: 38rpx;
margin-top: 4rpx;
}
.orderData-cont-text {
width: calc(100% - 68rpx);
margin-left: 20rpx;
box-sizing: border-box;
font-size: 30rpx;
}
.orderData-cont-site {
width: calc(100% - 108rpx);
}
.orderData-cont-name {
margin-bottom: 10rpx;
}
.orderData-cont-name text {
color: #999;
padding-left: 20rpx;
}
.orderData-cont-copy {
display: flex;
font-size: 28rpx;
color: #999;
}
.orderData-cont-copy text {
flex: 1;
display: inline-block;
margin-right: 20rpx;
}
.orderData-cont-copy view {
color: #3b7cff;
}
.address-btn {
width: 42rpx;
height: 42rpx;
margin-top: 46rpx;
}
/* 产品 */
.list-goods {
display: flex;
padding: 30rpx;
box-sizing: border-box;
}
.list-goods-img {
width: 184rpx;
height: 184rpx;
margin-right: 30rpx;
border-radius: 10rpx;
}
.list-goods-cont {
width: calc(100% - 214rpx);
}
.list-goods-name {
font-size: 32rpx;
}
.list-goods-text {
line-height: 90rpx;
display: flex;
font-size: 28rpx;
color: #999999;
}
.list-goods-text text {
flex: 1;
}
.list-goods-parice {
text-align: right;
font-size: 28rpx;
}
.list-goods-parice text {
font-size: 34rpx;
}
/* 规格 */
.reserveCont-title {
padding: 30rpx;
font-size: 30rpx;
}
.reserve-label {
display: flex;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
font-size: 28rpx;
line-height: 48rpx;
}
.reserve-name {
flex: 1;
width: 200rpx;
margin-right: 20rpx;
color: #7e7e7e;
}
.reserve-text {
width: calc(100% - 240rpx);
text-align: right;
line-height: 50rpx;
}
.reserve-text-btn {
width: 120rpx;
text-align: center;
color: #ffffff;
background-color: #3b7cff;
font-size: 26rpx;
border-radius: 10rpx;
line-height: 54rpx;
}
.reserve-text-copy {
display: contents;
}
.reserve-text-tap {
color: #ff9951;
padding-left: 30rpx;
}
.reserve-text text {
font-size: 24rpx;
display: inline-block;
background-image: linear-gradient(to right, #f16e06, #f34206);
color: #FFFFFF;
border-radius: 6rpx;
padding: 0 10rpx;
height: 44rpx;
line-height: 44rpx;
margin-top: 6rpx;
}
.reserve-text text.active {
background-image: linear-gradient(to right, #027be6, #2855f0);
}
.reserve-text.reserve-price {
font-weight: 600;
font-size: 34rpx;
}
.reserve-copy {
color: #3b7cff;
border: #3b7cff 2rpx solid;
display: inline-block;
height: 34rpx;
line-height: 34rpx;
font-size: 26rpx;
padding: 0 10rpx;
border-radius: 4rpx;
margin-left: 10rpx;
}
.reserve-status {
color: #ff8100
}
/* 底部菜单 */
.order-data-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
border-top: solid 1rpx #f2f2f2;
padding-top: 20rpx;
padding-right: 30rpx;
padding-left: 30rpx;
height: 110rpx;
background: white;
flex-wrap: wrap;
flex-direction: row-reverse;
z-index: 9;
}
.list-btn {
text-align: right;
}
.order-btn {
border: 2rpx solid #ff8100;
color: #ff8100;
border-radius: 80rpx;
height: 56rpx;
line-height: 56rpx;
padding: 0 20rpx;
display: inline-block;
font-size: 26rpx;
margin-left: 30rpx;
}
.order-btn.grey {
color: grey;
border-color: grey;
}

View File

@@ -0,0 +1,64 @@
// pages/order/refundWrite/refundWrite.js
Page({
/**
* 页面的初始数据
*/
data: {
disabled: false,
refundNo: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
refundNo: options.refund_no
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 提交表单
*/
siteform(e) {
let value = e.detail.value
let data = {
company : value.company,
number : value.number
}
this.setData({
disabled: true
})
wx.$api.order.refundDeliver(this.data.refundNo, data).then(() => {
wx.showToast({
title: '提交成功',
icon : 'none'
})
setTimeout(()=>{
wx.navigateTo({
url: '/pages/order/refund/refund',
})
},3000)
}).catch(() =>{
this.setData({
disabled: false
})
})
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,13 @@
<form bindsubmit="siteform" class="site-form">
<view class="site-input">
<label>物流公司</label>
<input placeholder="请输入物流公司" name="company" type="text" class="site-input-back"/>
</view>
<view class="site-input">
<label>物流单号</label>
<input placeholder="请输入物流单号" name="number" type="text" class="site-input-back"/>
</view>
<view class="site-btn">
<button form-type="submit" size="mini" disabled="{{disabled}}">确认提交</button>
</view>
</form>

View File

@@ -0,0 +1,53 @@
page {
background-color: #f4f4f6;
}
.site-input {
padding: 30rpx;
box-sizing: border-box;
}
.site-input label {
font-weight: 600;
}
.site-input-back {
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-top: 30rpx;
position: relative;
width: 100%;
height: 90rpx;
line-height: 90rpx;
}
.site-input-back image {
width: 44rpx;
height: 44rpx;
position: absolute;
right: 20rpx;
top: 25rpx;
}
.site-btn {
padding: 20rpx 30rpx;
margin-top: 6rpx;
}
.site-btn button[size="mini"] {
width: 100%;
background: #3b7cff;
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
color: white;
padding: 0;
}
.site-btn button[disabled] {
background: #7789ff !important;
color: #fff !important;
}

View File

@@ -58,7 +58,7 @@ page {
/* 友情提示 */ /* 友情提示 */
.report-point { .report-point {
padding: 140rpx 50rpx 0; padding: 40rpx 50rpx;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
} }

View File

@@ -79,6 +79,10 @@
<image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/cf133394e075d4acafc2426cc777dbaf.png" mode="widthFix"></image> <image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/cf133394e075d4acafc2426cc777dbaf.png" mode="widthFix"></image>
<view class="userOrder-item-name">已签收</view> <view class="userOrder-item-name">已签收</view>
</view> </view>
<view class="userOrder-item" bindtap="userNav" data-url="/pages/order/refund/refund">
<image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/cf133394e075d4acafc2426cc777dbaf.png" mode="widthFix"></image>
<view class="userOrder-item-name">退货售后</view>
</view>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -252,7 +252,7 @@ page {
background-color: #ff9951; background-color: #ff9951;
position: absolute; position: absolute;
top: -15rpx; top: -15rpx;
right: 40rpx; right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;

View File

@@ -116,5 +116,5 @@
] ]
} }
}, },
"libVersion": "2.33.0" "libVersion": "3.0.0"
} }

BIN
static/icons/editIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/imgs/add_img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B