[新增退款流程、查看物流]
This commit is contained in:
64
pages/order/refundWrite/refundWrite.js
Normal file
64
pages/order/refundWrite/refundWrite.js
Normal 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
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
3
pages/order/refundWrite/refundWrite.json
Normal file
3
pages/order/refundWrite/refundWrite.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
13
pages/order/refundWrite/refundWrite.wxml
Normal file
13
pages/order/refundWrite/refundWrite.wxml
Normal 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>
|
||||
53
pages/order/refundWrite/refundWrite.wxss
Normal file
53
pages/order/refundWrite/refundWrite.wxss
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user