小程序售后
parent
49de4ea06d
commit
9670daf021
|
|
@ -137,6 +137,7 @@ class Orderaftersale extends Common
|
|||
'return_only_money_reason' => empty($return_only_money_reason) ? [] : explode("\n", $return_only_money_reason),
|
||||
'return_money_goods_reason' => empty($return_money_goods_reason) ? [] : explode("\n", $return_money_goods_reason),
|
||||
'aftersale_type_list' => lang('common_order_aftersale_type_list'),
|
||||
'return_goods_address' => MyC('home_order_aftersale_return_goods_address', '管理员未填写', true),
|
||||
];
|
||||
return DataReturn('success', 0, $result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,8 +118,8 @@ class OrderAftersaleService
|
|||
[
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'msg',
|
||||
'checked_data' => '5,200',
|
||||
'error_msg' => '退款说明 5~200 个字符之间',
|
||||
'checked_data' => '200',
|
||||
'error_msg' => '退款说明最多 200 个字符',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'length',
|
||||
|
|
@ -194,8 +194,12 @@ class OrderAftersaleService
|
|||
|
||||
// 附件处理
|
||||
$images = [];
|
||||
if(!empty($params['images']) && is_array($params['images']))
|
||||
if(!empty($params['images']))
|
||||
{
|
||||
if(!is_array($params['images']))
|
||||
{
|
||||
$params['images'] = json_decode(htmlspecialchars_decode($params['images']), true);
|
||||
}
|
||||
foreach($params['images'] as $v)
|
||||
{
|
||||
$images[] = ResourcesService::AttachmentPathHandle($v);
|
||||
|
|
@ -227,7 +231,7 @@ class OrderAftersaleService
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 用户退货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
|
|
|
|||
|
|
@ -274,7 +274,11 @@ App({
|
|||
*/
|
||||
fields_check(data, validation) {
|
||||
for (var i in validation) {
|
||||
if ((data[validation[i]['fields']] || null) == null) {
|
||||
var temp_value = data[validation[i]["fields"]];
|
||||
var temp_is_can_zero = validation[i]["is_can_zero"] || null;
|
||||
|
||||
if ((temp_value == undefined || temp_value.length == 0 || temp_value == -1) || (temp_is_can_zero == null && temp_value == 0)
|
||||
) {
|
||||
this.showToast(validation[i]['msg']);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -287,7 +287,11 @@ App({
|
|||
*/
|
||||
fields_check(data, validation) {
|
||||
for (var i in validation) {
|
||||
if ((data[validation[i]['fields']] || null) == null) {
|
||||
var temp_value = data[validation[i]["fields"]];
|
||||
var temp_is_can_zero = validation[i]["is_can_zero"] || null;
|
||||
|
||||
if ((temp_value == undefined || temp_value.length == 0 || temp_value == -1) || (temp_is_can_zero == null && temp_value == 0)
|
||||
) {
|
||||
this.showToast(validation[i]['msg']);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"pages": ["pages/user-orderaftersale-detail/user-orderaftersale-detail",
|
||||
"pages/user-order/user-order",
|
||||
"pages": [
|
||||
"pages/user/user",
|
||||
"pages/user-order/user-order",
|
||||
|
||||
"pages/index/index",
|
||||
"pages/goods-category/goods-category",
|
||||
"pages/cart/cart",
|
||||
|
|
@ -23,7 +24,8 @@
|
|||
"pages/message/message",
|
||||
"pages/user-integral/user-integral",
|
||||
"pages/user-goods-browse/user-goods-browse",
|
||||
"pages/user-orderaftersale/user-orderaftersale"
|
||||
"pages/user-orderaftersale/user-orderaftersale",
|
||||
"pages/user-orderaftersale-detail/user-orderaftersale-detail"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTitleText": "{{application_title}}",
|
||||
|
|
|
|||
|
|
@ -362,6 +362,7 @@ button[disabled].bg-primary {
|
|||
border-bottom: 1px solid #eee;
|
||||
border-radius: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.form-gorup input,
|
||||
|
|
@ -379,12 +380,26 @@ button[disabled].bg-primary {
|
|||
*/
|
||||
.form-container-upload .form-upload-data .item {
|
||||
padding: 10rpx;
|
||||
position: relative;
|
||||
}
|
||||
.form-container-upload .form-upload-data .delete-icon {
|
||||
position: absolute;
|
||||
top: 18rpx;
|
||||
right: 18rpx;
|
||||
color: #e5e5e5;
|
||||
background-color: #d9534f;
|
||||
padding: 5rpx 18rpx;
|
||||
font-size: 30rpx;
|
||||
border-style: solid;
|
||||
border-width: 0 0 1px 1px;
|
||||
border-color: #eee;
|
||||
}
|
||||
.form-container-upload .form-upload-data image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
padding: 5rpx;
|
||||
border: 1px solid #eee;
|
||||
display: block;
|
||||
}
|
||||
.form-container-upload .upload-icon {
|
||||
margin: 10rpx 0 0 10rpx;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Page({
|
|||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
popup_delivery_status: false,
|
||||
|
||||
// 接口数据
|
||||
order_data: null,
|
||||
new_aftersale_data: null,
|
||||
step_data: null,
|
||||
|
|
@ -14,18 +16,101 @@ Page({
|
|||
return_money_goods_reason: [],
|
||||
aftersale_type_list: [],
|
||||
reason_data_list: [],
|
||||
return_goods_address: null,
|
||||
|
||||
// 售后基础信息
|
||||
panel_base_data_list: [
|
||||
{
|
||||
name: '退款类型',
|
||||
field: 'type_text',
|
||||
},
|
||||
{
|
||||
name: '当前状态',
|
||||
field: 'status_text',
|
||||
},
|
||||
{
|
||||
name: '申请原因',
|
||||
field: 'reason',
|
||||
},
|
||||
{
|
||||
name: '退货数量',
|
||||
field: 'number',
|
||||
},
|
||||
{
|
||||
name: '退款金额',
|
||||
field: 'price',
|
||||
},
|
||||
{
|
||||
name: '退款说明',
|
||||
field: 'msg',
|
||||
},
|
||||
{
|
||||
name: '退款方式',
|
||||
field: 'refundment_text',
|
||||
},
|
||||
{
|
||||
name: '拒绝原因',
|
||||
field: 'refuse_reason',
|
||||
},
|
||||
{
|
||||
name: '申请时间',
|
||||
field: 'apply_time_time',
|
||||
},
|
||||
{
|
||||
name: '确认时间',
|
||||
field: 'confirm_time_time',
|
||||
},
|
||||
{
|
||||
name: '退货时间',
|
||||
field: 'delivery_time_time',
|
||||
},
|
||||
{
|
||||
name: '审核时间',
|
||||
field: 'audit_time_time',
|
||||
},
|
||||
{
|
||||
name: '取消时间',
|
||||
field: 'cancel_time_time',
|
||||
},
|
||||
{
|
||||
name: '添加时间',
|
||||
field: 'add_time_time',
|
||||
},
|
||||
{
|
||||
name: '更新时间',
|
||||
field: 'upd_time_time',
|
||||
}
|
||||
],
|
||||
|
||||
// 快递信息
|
||||
panel_express_data_list: [
|
||||
{
|
||||
name: '快递名称',
|
||||
field: 'express_name',
|
||||
},
|
||||
{
|
||||
name: '快递单号',
|
||||
field: 'express_number',
|
||||
},
|
||||
{
|
||||
name: '退货时间',
|
||||
field: 'delivery_time_time',
|
||||
}
|
||||
],
|
||||
|
||||
// 表单数据
|
||||
form_button_disabled: false,
|
||||
form_type: -1,
|
||||
form_reason_index: -1,
|
||||
form_price: '',
|
||||
form_msg: '',
|
||||
form_number: 0,
|
||||
form_images_list: [],
|
||||
form_express_name: '',
|
||||
form_express_number: '',
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
params['oid'] = 4;
|
||||
params['did'] = 8;
|
||||
this.setData({ params: params });
|
||||
this.init();
|
||||
},
|
||||
|
|
@ -60,18 +145,19 @@ Page({
|
|||
data_list_loding_msg: '',
|
||||
|
||||
order_data: data.order_data || null,
|
||||
new_aftersale_data: data.new_aftersale_data || null,
|
||||
new_aftersale_data: ((data.new_aftersale_data || null) == null || data.new_aftersale_data.length <= 0) ? null : data.new_aftersale_data,
|
||||
step_data: data.step_data || null,
|
||||
returned_data: data.returned_data || null,
|
||||
return_only_money_reason: data.return_only_money_reason || [],
|
||||
return_money_goods_reason: data.return_money_goods_reason || [],
|
||||
aftersale_type_list: data.aftersale_type_list || [],
|
||||
return_goods_address: data.return_goods_address || null,
|
||||
|
||||
form_price: (data.returned_data || null != null) ? data.returned_data.refund_price : 0,
|
||||
});
|
||||
} else {
|
||||
self.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
|
|
@ -99,6 +185,7 @@ Page({
|
|||
form_type: value,
|
||||
form_reason_index: (this.data.form_type == value) ? this.data.form_reason_index : -1,
|
||||
reason_data_list: (value == 0) ? this.data.return_only_money_reason : this.data.return_money_goods_reason,
|
||||
form_number: (value == 0) ? 0 : this.data.returned_data.returned_quantity,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -130,6 +217,46 @@ Page({
|
|||
});
|
||||
},
|
||||
|
||||
// 快递名称
|
||||
form_express_name_event(e) {
|
||||
this.setData({
|
||||
form_express_name: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
// 快递单号
|
||||
form_express_number_event(e) {
|
||||
this.setData({
|
||||
form_express_number: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
// 上传图片预览
|
||||
upload_show_event(e) {
|
||||
wx.previewImage({
|
||||
current: this.data.form_images_list[e.currentTarget.dataset.index],
|
||||
urls: this.data.form_images_list,
|
||||
});
|
||||
},
|
||||
|
||||
// 图片删除
|
||||
upload_delete_event(e) {
|
||||
var self = this;
|
||||
wx.showModal({
|
||||
title: '温馨提示',
|
||||
content: '删除后不可恢复、继续吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
var list = self.data.form_images_list;
|
||||
list.splice(e.currentTarget.dataset.index, 1);
|
||||
self.setData({
|
||||
form_images_list: list,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 文件上传
|
||||
file_upload_event(e) {
|
||||
var self = this;
|
||||
|
|
@ -182,6 +309,145 @@ Page({
|
|||
}
|
||||
},
|
||||
|
||||
// 售后表单提交
|
||||
form_submit_event(e) {
|
||||
// 表单数据
|
||||
var form_data = {
|
||||
order_id: this.data.params.oid,
|
||||
order_detail_id: this.data.params.did,
|
||||
type: this.data.form_type,
|
||||
reason: this.data.reason_data_list[this.data.form_reason_index],
|
||||
number: (this.data.form_type == 0) ? 0 : this.data.form_number,
|
||||
price: this.data.form_price,
|
||||
msg: this.data.form_msg,
|
||||
images: JSON.stringify(this.data.form_images_list),
|
||||
}
|
||||
|
||||
// 防止金额大于计算的金额
|
||||
if (form_data['price'] > this.data.returned_data['refund_price'])
|
||||
{
|
||||
form_data['price'] = this.data.returned_data['refund_price'];
|
||||
}
|
||||
|
||||
// 防止数量大于计算的数量
|
||||
if (form_data['number'] > this.data.returned_data['returned_quantity']) {
|
||||
form_data['number'] = this.data.returned_data['returned_quantity'];
|
||||
}
|
||||
|
||||
// 数据校验
|
||||
var validation = [
|
||||
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
|
||||
{ fields: "reason", msg: "请选择原因" },
|
||||
{ fields: "msg", msg: "请填写退款说明" }
|
||||
];
|
||||
if (form_data['type'] == 1)
|
||||
{
|
||||
validation.push({ fields: "number", msg: "请选择退货数量" });
|
||||
}
|
||||
|
||||
// 校验参数并提交
|
||||
if (app.fields_check(form_data, validation)) {
|
||||
var self = this;
|
||||
wx.showLoading({ title: "处理中..." });
|
||||
self.setData({ form_button_disabled: true });
|
||||
wx.request({
|
||||
url: app.get_request_url("create", "orderaftersale"),
|
||||
method: "POST",
|
||||
data: form_data,
|
||||
dataType: "json",
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded' },
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.showToast(res.data.msg, "success");
|
||||
setTimeout(function () {
|
||||
self.init();
|
||||
}, 1000);
|
||||
} else {
|
||||
self.setData({ form_button_disabled: false});
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
self.setData({ form_button_disabled: false });
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 退货开启弹层
|
||||
delivery_submit_event(e) {
|
||||
this.setData({ popup_delivery_status: true });
|
||||
},
|
||||
|
||||
// 退货弹层关闭
|
||||
popup_delivery_close_event(e) {
|
||||
this.setData({ popup_delivery_status: false });
|
||||
},
|
||||
|
||||
// 退货表单
|
||||
form_delivery_submit_event(e) {
|
||||
// 表单数据
|
||||
var form_data = {
|
||||
id: this.data.new_aftersale_data.id,
|
||||
express_name: this.data.form_express_name,
|
||||
express_number: this.data.form_express_number,
|
||||
}
|
||||
|
||||
// 数据校验
|
||||
var validation = [
|
||||
{ fields: "express_name", msg: "请填写快递名称" },
|
||||
{ fields: "express_number", msg: "请填写快递单号" },
|
||||
];
|
||||
|
||||
// 校验参数并提交
|
||||
if (app.fields_check(form_data, validation)) {
|
||||
var self = this;
|
||||
wx.showLoading({ title: "处理中..." });
|
||||
self.setData({ form_button_disabled: true });
|
||||
wx.request({
|
||||
url: app.get_request_url("delivery", "orderaftersale"),
|
||||
method: "POST",
|
||||
data: form_data,
|
||||
dataType: "json",
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded' },
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
self.setData({ popup_delivery_status: false});
|
||||
if (res.data.code == 0) {
|
||||
app.showToast(res.data.msg, "success");
|
||||
setTimeout(function () {
|
||||
self.init();
|
||||
}, 1000);
|
||||
} else {
|
||||
self.setData({ form_button_disabled: false });
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
self.setData({ form_button_disabled: false });
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 凭证图片预览
|
||||
images_view_event(e) {
|
||||
wx.previewImage({
|
||||
current: this.data.new_aftersale_data.images[e.currentTarget.dataset.index],
|
||||
urls: this.data.new_aftersale_data.images,
|
||||
});
|
||||
},
|
||||
|
||||
// 查看售后数据
|
||||
show_aftersale_event(e) {
|
||||
console.log(1);
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
{
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"component-popup": "/components/popup/popup"
|
||||
}
|
||||
}
|
||||
|
|
@ -21,58 +21,152 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 类型选择 -->
|
||||
<view wx:if="{{aftersale_type_list.length > 0}}" class="choose-type bg-white spacing-mb oh">
|
||||
<block wx:for="{{aftersale_type_list}}" wx:key="item">
|
||||
<view class="choose-item {{index == 0 ? 'fl' : 'fr'}} {{form_type == item.value ? 'choose-item-active' : ''}}" data-value="{{item.value}}" bindtap="form_type_event">
|
||||
<view class="choose-name">{{item.name}}</view>
|
||||
<view class="choose-desc cr-888">{{item.desc}}</view>
|
||||
<!-- 基础信息 -->
|
||||
<view wx:if="{{new_aftersale_data != null}}" class="detail bg-white">
|
||||
<!-- 提示/退货 -->
|
||||
<view wx:if="{{new_aftersale_data.status <= 2}}" class="msg-tips spacing-mb">
|
||||
<text class="msg-text">{{new_aftersale_data.tips_msg}}</text>
|
||||
<text class="msg-a" bindtap="show_aftersale_event">详情查看 >></text>
|
||||
<view>
|
||||
<button wx:if="{{new_aftersale_data.status == 1 && new_aftersale_data.type == 1 && return_goods_address != null}}" type="primary" size="mini" bindtap="delivery_submit_event">立即退货</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 表单 -->
|
||||
<view wx:if="{{form_type != -1}}" class="form-container bg-white spacing-mb oh">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款原因<text class="form-group-tips-must">必选</text></view>
|
||||
<picker bindchange="form_reason_event" value="{{form_reason_index}}" range="{{reason_data_list}}">
|
||||
<view class="picker {{form_reason_index == -1 ? 'cr-ccc' : 'cr-666'}} arrow-right">
|
||||
{{form_reason_index == -1 ? '请选择原因' : reason_data_list[form_reason_index]}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{form_type == 1}}" class="form-gorup">
|
||||
<view class="form-gorup-title">商品件数<text class="form-group-tips-must">必填</text></view>
|
||||
<slider bindchange="form_number_event" min="1" max="{{returned_data.returned_quantity}}" step="1" value="{{returned_data.returned_quantity}}" show-value />
|
||||
<!-- 退货地址 -->
|
||||
<view wx:if="{{new_aftersale_data.status == 1 && new_aftersale_data.type == 1 && return_goods_address != null}}" class="return-address msg-tips msg-tips-warning spacing-mb">
|
||||
<view>
|
||||
<text class="address-title">退货地址:</text>
|
||||
<text class="address-value">{{return_goods_address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款金额<text class="form-group-tips-must">必填</text></view>
|
||||
<input type="digit" bindinput="form_price_event" placeholder-class="cr-ccc" class="cr-666" placeholder="请输入退款金额" value="{{form_price}}" />
|
||||
<!-- 提示 -->
|
||||
<view wx:if="{{new_aftersale_data.status >= 3}}" class="msg-tips {{new_aftersale_data.status != 5 ? 'spacing-mb' : ''}} {{new_aftersale_data.status == 3 ? 'msg-tips-success' : (new_aftersale_data.status == 4 ? 'msg-tips-danger' : 'msg-tips-warning')}}">
|
||||
<text class="msg-text">{{new_aftersale_data.tips_msg}}</text>
|
||||
<text class="msg-a" bindtap="show_aftersale_event">详情查看 >></text>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
|
||||
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
|
||||
</view>
|
||||
|
||||
<view class="form-gorup form-container-upload">
|
||||
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
|
||||
<view class="form-upload-data fl">
|
||||
<block wx:for="{{form_images_list}}" wx:key="item">
|
||||
<view class="item fl">
|
||||
<image src="{{item}}" mode="aspectFill" />
|
||||
<!-- 详情 -->
|
||||
<view wx:if="{{new_aftersale_data.status != 5}}">
|
||||
<!-- 申请信息 -->
|
||||
<view class="panel-item">
|
||||
<view class="panel-title">申请信息</view>
|
||||
<view class="panel-content">
|
||||
<view wx:for="{{panel_base_data_list}}" wx:key="item" class="panel-value cr-666">
|
||||
<text>{{item.name}}:</text>
|
||||
<text>{{new_aftersale_data[item.field] || ''}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<image class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event" />
|
||||
</view>
|
||||
|
||||
<!-- 快递信息 -->
|
||||
<view wx:if="{{new_aftersale_data.status > 1 && new_aftersale_data.type == 1}}" class="panel-item spacing-mt">
|
||||
<view class="panel-title">快递信息</view>
|
||||
<view class="panel-content">
|
||||
<view wx:for="{{panel_express_data_list}}" wx:key="item" class="panel-value cr-666">
|
||||
<text>{{item.name}}:</text>
|
||||
<text>{{new_aftersale_data[item.field] || ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 凭证 -->
|
||||
<view wx:if="{{(new_aftersale_data.images || null) != null && new_aftersale_data.images.length > 0}}" class="panel-item spacing-mt">
|
||||
<view class="panel-title">凭证</view>
|
||||
<view class="panel-content voucher-data oh">
|
||||
<view wx:for="{{new_aftersale_data.images}}" wx:key="item" class="fl item">
|
||||
<image src="{{item}}" mode="aspectFill" bindtap="images_view_event" data-index="{{index}}" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 没有售后数据/售后数据为已取消则可以重新申请售后 -->
|
||||
<view wx:if="{{new_aftersale_data == null || new_aftersale_data.status == 5}}" class="spacing-mt">
|
||||
<!-- 类型选择 -->
|
||||
<view wx:if="{{aftersale_type_list.length > 0}}" class="choose-type bg-white spacing-mb oh">
|
||||
<block wx:for="{{aftersale_type_list}}" wx:key="item">
|
||||
<view class="choose-item {{index == 0 ? 'fl' : 'fr'}} {{form_type == item.value ? 'choose-item-active' : ''}}" data-value="{{item.value}}" bindtap="form_type_event">
|
||||
<view class="choose-name">{{item.name}}</view>
|
||||
<view class="choose-desc cr-888">{{item.desc}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<import src="/pages/common/bottom_line.wxml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</view>
|
||||
<!-- 表单 -->
|
||||
<view wx:if="{{form_type != -1}}" class="form-container bg-white spacing-mb oh">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款原因<text class="form-group-tips-must">必选</text></view>
|
||||
<picker bindchange="form_reason_event" value="{{form_reason_index}}" range="{{reason_data_list}}">
|
||||
<view class="picker {{form_reason_index == -1 ? 'cr-ccc' : 'cr-666'}} arrow-right">
|
||||
{{form_reason_index == -1 ? '请选择原因' : reason_data_list[form_reason_index]}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{form_type == 1}}" class="form-gorup">
|
||||
<view class="form-gorup-title">商品件数<text class="form-group-tips">不能大于{{returned_data.returned_quantity}}数量</text></view>
|
||||
<slider bindchange="form_number_event" min="0" max="{{returned_data.returned_quantity}}" step="1" value="{{returned_data.returned_quantity}}" show-value />
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款金额<text class="form-group-tips">不能大于{{returned_data.refund_price}}元</text></view>
|
||||
<input type="digit" bindinput="form_price_event" placeholder-class="cr-ccc" class="cr-666" placeholder="请输入退款金额" value="{{form_price}}" />
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
|
||||
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
|
||||
</view>
|
||||
|
||||
<view class="form-gorup form-container-upload">
|
||||
<view class="form-gorup-title">上传凭证<text class="form-group-tips">最多上传3张图片</text></view>
|
||||
<view class="form-upload-data fl">
|
||||
<block wx:if="{{form_images_list.length > 0}}">
|
||||
<view wx:for="{{form_images_list}}" wx:key="item" class="item fl">
|
||||
<text class="delete-icon" bindtap="upload_delete_event" data-index="{{index}}">x</text>
|
||||
<image src="{{item}}" bindtap="upload_show_event" data-index="{{index}}" mode="aspectFill" />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<image wx:if="{{form_images_list.length < 3}}" class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event" />
|
||||
</view>
|
||||
<view class="form-gorup">
|
||||
<button class="bg-main submit-bottom" type="default" bindtap="form_submit_event" hover-class="none" disabled="{{form_button_disabled}}">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退货弹层 -->
|
||||
<component-popup prop-show="{{popup_delivery_status}}" prop-position="bottom" bindonclose="popup_delivery_close_event">
|
||||
<view class="share-popup bg-white">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" catchtap="popup_delivery_close_event">
|
||||
<icon type="clear" size="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="delivery-popup-content">
|
||||
<view class="form-container">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">快递名称<text class="form-group-tips-must">必填</text></view>
|
||||
<input type="text" bindinput="form_express_name_event" placeholder-class="cr-ccc" class="cr-666" placeholder="请输入快递名称" value="{{form_express_name}}" />
|
||||
</view>
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">快递单号<text class="form-group-tips-must">必填</text></view>
|
||||
<input type="text" bindinput="form_express_number_event" placeholder-class="cr-ccc" class="cr-666" placeholder="请输入快递单号" value="{{form_express_number}}" />
|
||||
</view>
|
||||
<view class="form-gorup">
|
||||
<button class="bg-main submit-bottom" type="default" bindtap="form_delivery_submit_event" hover-class="none" disabled="{{form_button_disabled}}">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</component-popup>
|
||||
</view>
|
||||
<view wx:if="{{order_data == null}}">
|
||||
<import src="/pages/common/nodata.wxml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
||||
<import src="/pages/common/bottom_line.wxml" />
|
||||
<template wx:if="{{new_aftersale_data != null && new_aftersale_data.status != 5}}" is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
|
|
@ -51,4 +51,82 @@
|
|||
.choose-type .choose-item-active {
|
||||
border: 1px solid #d2364c;
|
||||
box-shadow: 0px 0 0px 1px #d2364c;
|
||||
}
|
||||
|
||||
/*
|
||||
* 售后信息
|
||||
*/
|
||||
.detail {
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
.detail .msg-tips {
|
||||
padding: 10rpx;
|
||||
border-radius: 0;
|
||||
background: #f1faff;
|
||||
border: 1px solid #e2f5ff;
|
||||
color: #1490d2;
|
||||
}
|
||||
.detail .msg-tips-warning {
|
||||
background-color: #fff7f1;
|
||||
border-color: #fff0e4;
|
||||
color: #f37b1d;
|
||||
}
|
||||
.detail .msg-tips-success {
|
||||
background-color: #eef7ea;
|
||||
border-color: #e3f3d6;
|
||||
color: #468847;
|
||||
}
|
||||
.detail .msg-tips-danger {
|
||||
background-color: #fff1f0;
|
||||
border-color: #ffe4e3;
|
||||
color: #dd514c;
|
||||
}
|
||||
.detail .msg-tips .msg-a {
|
||||
color: #d2354c;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.detail .msg-tips-danger .msg-a {
|
||||
color: #136ed9;
|
||||
}
|
||||
|
||||
.voucher-data .item {
|
||||
padding: 10rpx;
|
||||
}
|
||||
.voucher-data .item image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* 退货地址
|
||||
*/
|
||||
.return-address .address-value {
|
||||
color: #0e90d2;
|
||||
}
|
||||
.detail .msg-tips button {
|
||||
border-radius: 3px;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
/*
|
||||
* 面板信息
|
||||
*/
|
||||
.panel-item {
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.panel-item .panel-title {
|
||||
background: #eee;
|
||||
font-weight: bold;
|
||||
}
|
||||
.panel-item .panel-title,
|
||||
.panel-item .panel-content {
|
||||
padding: 10rpx;
|
||||
}
|
||||
.panel-item .panel-value {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
Loading…
Reference in New Issue