增加新功能
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
<view class="order_type_title">
|
||||
<view
|
||||
:class="type === item.id ? 'order_type_title_item order_type_title_item_sel':'order_type_title_item'"
|
||||
:class="form.type === item.id ? 'order_type_title_item order_type_title_item_sel':'order_type_title_item'"
|
||||
v-for="item in orderTypeList"
|
||||
@click="checkType(item)"
|
||||
:key="item.id"
|
||||
@@ -20,12 +20,12 @@
|
||||
<!-- 头部 -->
|
||||
<view class="order_item_header">
|
||||
<view class="order_item_header_left">
|
||||
<up-image :src="item.url" width="22" height="22" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="order_product_title">{{item.name}}</view>
|
||||
<up-image :src="item.shopLogo" width="22" height="22" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="order_product_title">{{item.shopName}}</view>
|
||||
</view>
|
||||
<!-- 除开待付款 -->
|
||||
<view
|
||||
v-if="item.status !== 1"
|
||||
v-if="item.status !== ORDER_TYPE.UNPAID"
|
||||
class="order_item_header_right"
|
||||
:style="{'color': ORDER_STATUS_CSS[item.status]}">
|
||||
{{getValue(ORDER_STATUS,item.status)}}
|
||||
@@ -33,41 +33,41 @@
|
||||
<!-- 待付款 -->
|
||||
<view v-else class="order_item_header_right order_right_due">
|
||||
<view class="order_right_due_msg">等待付款</view>
|
||||
<view class="order_right_due_time">{{item.paymentTime}}分钟</view>
|
||||
<view class="order_right_due_time">{{item.expireTime}}分钟</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 产品详情 -->
|
||||
<view class="order_item_content">
|
||||
<view v-for="pItem in item.product" :key="pItem.id" class="content_item">
|
||||
<up-image :src="pItem.url" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view v-for="pItem in item.items" :key="pItem.id" class="content_item">
|
||||
<up-image :src="pItem.mainGraph" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="content_info">
|
||||
<view class="content_info_title">{{pItem.title}}</view>
|
||||
<view class="content_info_tag">{{pItem.tag.join(" ")}}</view>
|
||||
<view>
|
||||
<view class="content_info_tag">{{pItem.goodsSpece}}</view>
|
||||
<!-- <view>
|
||||
<text class="content_info_description" v-for="dItem in pItem.description">
|
||||
{{dItem}}
|
||||
</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="content_right">
|
||||
<view class="content_right_total">¥{{pItem.total}}</view>
|
||||
<view class="content_right_quantity">x{{pItem.quantity}}</view>
|
||||
<view class="content_right_total">¥{{pItem.goodsAmount}}</view>
|
||||
<view class="content_right_quantity">x{{pItem.buyNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 汇总 -->
|
||||
<view class="order_item_collect">
|
||||
<view class="collect_msg">共1件,合计¥3599</view>
|
||||
<view class="collect_msg">共{{item.buyNum}}件,合计¥{{item.sumAmount}}</view>
|
||||
<view class="collect_operate">
|
||||
<view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.UNSHIPPED" @click="checkCancel(true)">取消订单</view>
|
||||
<view class="operate_comm operate_but_2" v-if="item.status === ORDER_TYPE.UNPAID" @click="jumpOrderInfo">去付款</view>
|
||||
<view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请退款</view>
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请退款</view> -->
|
||||
<view class="operate_comm operate_but_2" v-if="item.status === ORDER_TYPE.NOT_RECEIVE">确认收货</view>
|
||||
<view class="operate_comm operate_but_3" v-if="item.status === ORDER_TYPE.UNSHIPPED">提醒发货</view>
|
||||
<view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请售后</view>
|
||||
<view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.AFTER_SALE">查看售后</view>
|
||||
<view class="operate_comm operate_but_1" v-if="[ORDER_TYPE.COMPLETED].includes(item.status)">删除记录</view>
|
||||
<view class="operate_comm operate_but_3" v-if="[ORDER_TYPE.COMPLETED,ORDER_TYPE.CANCELED].includes(item.status)">再次购买</view>
|
||||
<!-- <view class="operate_comm operate_but_3" v-if="item.status === ORDER_TYPE.UNSHIPPED">提醒发货</view> -->
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请售后</view> -->
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.AFTER_SALE">查看售后</view> -->
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="[ORDER_TYPE.COMPLETED].includes(item.status)">删除记录</view> -->
|
||||
<!-- <view class="operate_comm operate_but_3" v-if="[ORDER_TYPE.COMPLETED,ORDER_TYPE.CANCELED].includes(item.status)">再次购买</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -118,6 +118,7 @@
|
||||
<script>
|
||||
import { ORDER_TYPE,ORDER_STATUS,getValue } from '@/utils/enumUtils.js';
|
||||
import { ORDER_STATUS_CSS } from '@/utils/enumCssUtils.js';
|
||||
import { getOrderList } from '@/api/order.js';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
@@ -133,12 +134,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type:0,// 选中的类型
|
||||
orderTypeList:[
|
||||
{
|
||||
id:0,
|
||||
title:"全部",
|
||||
},
|
||||
{
|
||||
id:ORDER_TYPE.UNPAID,
|
||||
title:"待支付",
|
||||
@@ -149,12 +145,15 @@
|
||||
id:ORDER_TYPE.NOT_RECEIVE,
|
||||
title:"待收货",
|
||||
},{
|
||||
id:ORDER_TYPE.AFTER_SALE,
|
||||
title:"退款售后",
|
||||
id:ORDER_TYPE.SUCCEED,
|
||||
title:"待评价",
|
||||
},
|
||||
],
|
||||
form:{
|
||||
search:null,//搜索
|
||||
page:1,
|
||||
pageSize:15,
|
||||
type:0,// 选中的类型
|
||||
},
|
||||
orderList:[
|
||||
{
|
||||
@@ -284,7 +283,8 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
const type = options.type;
|
||||
this.type = type ? parseInt(type,10) : 0;
|
||||
this.form.type = type ? parseInt(type,10) : ORDER_TYPE.UNPAID;
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
getValue,
|
||||
@@ -297,13 +297,24 @@
|
||||
console.log("searchFun",val);
|
||||
},
|
||||
checkType(item){
|
||||
this.type = item.id;
|
||||
this.form.type = item.id;
|
||||
this.getOrderList();
|
||||
},
|
||||
jumpOrderInfo(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/mine_order_info/mine_order_info?type="+this.type,
|
||||
})
|
||||
},
|
||||
async getOrderList(){
|
||||
const params = {
|
||||
...this.form,
|
||||
}
|
||||
const resp = await getOrderList(params);
|
||||
console.log("resp",resp);
|
||||
if(resp && resp.bizcode === 100){
|
||||
this.orderList = resp.data;
|
||||
}
|
||||
},
|
||||
checkCancel(status){
|
||||
this.cancelShow = status;
|
||||
if(!status){
|
||||
@@ -313,6 +324,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 确认取消
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user