|
|
|
@ -3,64 +3,65 @@ |
|
|
|
|
<view class="head-info"> |
|
|
|
|
<!-- 搜索 --> |
|
|
|
|
<view class="searchContent"> |
|
|
|
|
<u-input v-model="searchText" placeholder="输入订单编号/收件人名字/电话商品名称"/> |
|
|
|
|
<u-icon name="search" class="search"></u-icon> |
|
|
|
|
<view class="filter" @click="getFilterHandle"> |
|
|
|
|
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="输入订单编号/收件人名字/电话商品名称" v-model="keyword"></u-search> |
|
|
|
|
<!-- <u-input v-model="keyword" placeholder="输入订单编号/收件人名字/电话商品名称"/> --> |
|
|
|
|
<!-- <u-icon name="search" class="search"></u-icon> --> |
|
|
|
|
<!-- <view class="filter" @click="getFilterHandle"> |
|
|
|
|
<image src="/static/news3/filter.png" mode="widthFix"></image> |
|
|
|
|
<text>筛选</text> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 分类列表 --> |
|
|
|
|
<view class="container"> |
|
|
|
|
<view class="classify-list"> |
|
|
|
|
<view class="list" v-for="(item,index) in classList" |
|
|
|
|
:class="{'action':classifyShow==index}" |
|
|
|
|
:class="{'action':classifyShow==item.id}" |
|
|
|
|
@click="onClassify(item,index)" |
|
|
|
|
:key="index"> |
|
|
|
|
<text>{{item.name}}</text> |
|
|
|
|
<text class="line" v-show="classifyShow==index"></text> |
|
|
|
|
<text class="line" v-show="classifyShow==item.id"></text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="shopContent"> |
|
|
|
|
<view class="shopItem" v-for="(item,index) in goodsList" :key="index"> |
|
|
|
|
<view class="orderInfo"> |
|
|
|
|
<text>订单号:{{item.orderNum}}</text> |
|
|
|
|
<text class="statusText">{{getLable(item.status)}}</text> |
|
|
|
|
<text>订单号:{{item.order_no}}</text> |
|
|
|
|
<text class="statusText">{{item.state_text}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="shopItemInfo" v-for="(p,i) in item.children" :key="i"> |
|
|
|
|
<image :src="p.image"></image> |
|
|
|
|
<view class="shopItemInfo" v-for="(p,i) in item.goods" :key="i"> |
|
|
|
|
<image :src="p.goods_image"></image> |
|
|
|
|
<view class="priceCon"> |
|
|
|
|
<text class="num">x{{p.num}}</text> |
|
|
|
|
<text class="num">x{{p.total_num}}</text> |
|
|
|
|
<view class="priceText"> |
|
|
|
|
<text style="font-size: 26upx;">¥</text> |
|
|
|
|
<text>{{p.price}}</text> |
|
|
|
|
<text>{{p.total_price}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="totalNum"> |
|
|
|
|
<text>含运费¥{{item.yunfei}}</text> |
|
|
|
|
<text>含运费¥{{item.third_money}}</text> |
|
|
|
|
<text>共计:</text> |
|
|
|
|
<text>¥{{item.total}}</text> |
|
|
|
|
<text>¥{{item.total_price}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="remark"> |
|
|
|
|
<view class="remarkTitle"> |
|
|
|
|
收件人姓名 {{item.phone}} |
|
|
|
|
收件人姓名 {{item.address?item.address.name:''}} |
|
|
|
|
</view> |
|
|
|
|
<view class="remarkContent"> |
|
|
|
|
{{item.remark}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="btnGroup"> |
|
|
|
|
<view class="btn info" v-show="item.status==2||item.status==1">修改地址</view> |
|
|
|
|
<view class="btn primary" v-show="item.status==2||item.status==1">修改价格</view> |
|
|
|
|
<view class="btn primary" v-show="item.status==2">发货</view> |
|
|
|
|
<view class="btn info" v-show="item.status==23">拒绝</view> |
|
|
|
|
<view class="btn primary" v-show="item.status==3">同意</view> |
|
|
|
|
<view class="btn info" v-show="item.status==4||item.status==6">删除订单</view> |
|
|
|
|
<view class="btn info" @click="afterSale=true" v-show="item.status==7">转至售后</view> |
|
|
|
|
<view class="btn primary" v-show="item.status==7">修改物流</view> |
|
|
|
|
<view class="btn info" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改地址</view> |
|
|
|
|
<view class="btn primary" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改价格</view> |
|
|
|
|
<view class="btn primary" v-show="item.state_text=='待发货'" @click="goJump('/pages/news3/sendOutGoods',item)">发货</view> |
|
|
|
|
<view class="btn info" v-show="item.state_text=='refund'">拒绝</view> |
|
|
|
|
<view class="btn primary" v-show="item.state_text=='refund'">同意</view> |
|
|
|
|
<view class="btn info" v-show="item.state_text=='cancel'||item.state_text=='complete'">删除订单</view> |
|
|
|
|
<view class="btn info" @click="afterSale=true" v-show="item.state_text=='receipt'">转至售后</view> |
|
|
|
|
<view class="btn primary" v-show="item.state_text=='receipt'">修改物流</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -152,75 +153,42 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import afterSale from './components/afterSales.vue' |
|
|
|
|
import * as newFunApi from '@/api/newFun' |
|
|
|
|
export default { |
|
|
|
|
components:{afterSale}, |
|
|
|
|
data(){ |
|
|
|
|
return{ |
|
|
|
|
searchText:'', |
|
|
|
|
classifyShow: 0, |
|
|
|
|
classifyShow: 'all', |
|
|
|
|
classList: [ |
|
|
|
|
{ |
|
|
|
|
id: 0, |
|
|
|
|
id: 'all', |
|
|
|
|
name: '全部', |
|
|
|
|
},{ |
|
|
|
|
id: 1, |
|
|
|
|
id: 'delivery', |
|
|
|
|
name: '待发货', |
|
|
|
|
},{ |
|
|
|
|
id: 2, |
|
|
|
|
id: 'receipt', |
|
|
|
|
name: '待验收', |
|
|
|
|
},{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '售后订单', |
|
|
|
|
id: 'pay', |
|
|
|
|
name: '待付款', |
|
|
|
|
},{ |
|
|
|
|
id: 4, |
|
|
|
|
id: 'complete', |
|
|
|
|
name: '已完成', |
|
|
|
|
},{ |
|
|
|
|
id: 5, |
|
|
|
|
name: '已退款', |
|
|
|
|
id: 'refund', |
|
|
|
|
name: '售后订单', |
|
|
|
|
},{ |
|
|
|
|
id: 'apply_cancel', |
|
|
|
|
name: '待取消', |
|
|
|
|
},{ |
|
|
|
|
id: 6, |
|
|
|
|
name: '已删除', |
|
|
|
|
id: 'cancel', |
|
|
|
|
name: '已取消', |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
goodsList:[ |
|
|
|
|
{ |
|
|
|
|
orderNum:7868867676878676876, |
|
|
|
|
status:7, |
|
|
|
|
total:5000, |
|
|
|
|
yunfei:5, |
|
|
|
|
name:'收件人姓名', |
|
|
|
|
phone:'188989988900', |
|
|
|
|
remark:'这里是备注', |
|
|
|
|
children:[ |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
] |
|
|
|
|
},{ |
|
|
|
|
orderNum:7868867676878676876, |
|
|
|
|
status:2, //待发货 |
|
|
|
|
total:5000, |
|
|
|
|
yunfei:5, |
|
|
|
|
name:'收件人姓名', |
|
|
|
|
phone:'188989988900', |
|
|
|
|
remark:'这里是备注', |
|
|
|
|
children:[ |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
] |
|
|
|
|
},{ |
|
|
|
|
orderNum:7868867676878676876, |
|
|
|
|
status:3, //待发货 |
|
|
|
|
total:5000, |
|
|
|
|
yunfei:5, |
|
|
|
|
name:'收件人姓名', |
|
|
|
|
phone:'188989988900', |
|
|
|
|
remark:'这里是备注', |
|
|
|
|
children:[ |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
{image:'/static/news3/filter.png',num:1,price:2500}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
show:false, |
|
|
|
|
timeShow:false, |
|
|
|
@ -239,46 +207,43 @@ export default { |
|
|
|
|
payIndex:0, |
|
|
|
|
startTime:null, |
|
|
|
|
endTime:null, |
|
|
|
|
classList: [ |
|
|
|
|
{ |
|
|
|
|
id: 0, |
|
|
|
|
name: '全部', |
|
|
|
|
},{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '待付款', |
|
|
|
|
},{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '待发货', |
|
|
|
|
},{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '售后订单', |
|
|
|
|
},{ |
|
|
|
|
id: 4, |
|
|
|
|
name: '已退款', |
|
|
|
|
},{ |
|
|
|
|
id: 5, |
|
|
|
|
name: '已完成', |
|
|
|
|
},{ |
|
|
|
|
id: 6, |
|
|
|
|
name: '已删除', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 7, |
|
|
|
|
name: '待收货', |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
pageNum:1, |
|
|
|
|
keyword: "", |
|
|
|
|
total: 1, |
|
|
|
|
pageNum: 1, |
|
|
|
|
// classList: [ |
|
|
|
|
// { |
|
|
|
|
// id: 0, |
|
|
|
|
// name: '全部', |
|
|
|
|
// },{ |
|
|
|
|
// id: 1, |
|
|
|
|
// name: '待付款', |
|
|
|
|
// },{ |
|
|
|
|
// id: 2, |
|
|
|
|
// name: '待发货', |
|
|
|
|
// },{ |
|
|
|
|
// id: 3, |
|
|
|
|
// name: '售后订单', |
|
|
|
|
// },{ |
|
|
|
|
// id: 4, |
|
|
|
|
// name: '已退款', |
|
|
|
|
// },{ |
|
|
|
|
// id: 5, |
|
|
|
|
// name: '已完成', |
|
|
|
|
// },{ |
|
|
|
|
// id: 6, |
|
|
|
|
// name: '已删除', |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: 7, |
|
|
|
|
// name: '待收货', |
|
|
|
|
// } |
|
|
|
|
// ], |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
|
|
|
|
|
// uni.setNavigationBarTitle({ |
|
|
|
|
// title: '首页', |
|
|
|
|
// }) |
|
|
|
|
// uni.setNavigationBarColor({ |
|
|
|
|
// frontColor: '#ffffff', |
|
|
|
|
// backgroundColor: '#fe3b0f', |
|
|
|
|
// }) |
|
|
|
|
this.getList() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
@ -291,17 +256,69 @@ export default { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods:{ |
|
|
|
|
getLable(val){ |
|
|
|
|
let arr = this.classList.filter(item=>{ |
|
|
|
|
return val==item.id |
|
|
|
|
async getList() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title:"加载中" |
|
|
|
|
}) |
|
|
|
|
let {status, message, data} = await newFunApi.shopOrderList({ |
|
|
|
|
dataType: this.classifyShow, |
|
|
|
|
page: this.pageNum, |
|
|
|
|
searchValue: this.keyword |
|
|
|
|
}); |
|
|
|
|
if(status == 200){ |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.goodsList = this.goodsList.concat(data.list.data) |
|
|
|
|
this.total = data.list.total |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
sendGoodsHandle(){ |
|
|
|
|
// let params={ |
|
|
|
|
// "orderId": 10004, |
|
|
|
|
// "form": { |
|
|
|
|
// "deliveryMethod": 10, |
|
|
|
|
// "packGoodsData": [ |
|
|
|
|
// { |
|
|
|
|
// "orderGoodsId": 10004, |
|
|
|
|
// "deliveryNum": 1 |
|
|
|
|
// } |
|
|
|
|
// ], |
|
|
|
|
// "expressId": 10005, |
|
|
|
|
// "expressNo": "222", |
|
|
|
|
// "syncMpWeixinShipping": 1 |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// let {status, message, data} = await newFunApi.sendGoods({ |
|
|
|
|
// dataType: this.classifyShow, |
|
|
|
|
// page: this.pageNum, |
|
|
|
|
// searchValue: this.keyword |
|
|
|
|
// }); |
|
|
|
|
// if(status == 200){ |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// this.goodsList = this.goodsList.concat(data.list.data) |
|
|
|
|
// this.total = data.list.total |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
goJump(path,value){ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: path+'?item='+JSON.stringify(value), |
|
|
|
|
}) |
|
|
|
|
return arr[0].name |
|
|
|
|
}, |
|
|
|
|
getListAfter(){ |
|
|
|
|
this.goodsList = []; |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
getLable(val){ |
|
|
|
|
// let arr = this.classList.filter(item=>{ |
|
|
|
|
// return val==item.id |
|
|
|
|
// }) |
|
|
|
|
// return arr[0].name |
|
|
|
|
}, |
|
|
|
|
onSearch(){ |
|
|
|
|
uni.navigateTo({url:''}) |
|
|
|
|
}, |
|
|
|
|
onClassify(item,index){ |
|
|
|
|
this.classifyShow = index; |
|
|
|
|
this.classifyShow = item.id; |
|
|
|
|
this.getListAfter() |
|
|
|
|
}, |
|
|
|
|
setResourceIndex(index){ |
|
|
|
|
this.sourceIndex = index; |
|
|
|
@ -318,7 +335,13 @@ export default { |
|
|
|
|
this.$refs.afterSales.afterSale = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReachBottom() { |
|
|
|
|
if(this.goodsList.length <= this.total){ |
|
|
|
|
this.pageNum ++; |
|
|
|
|
this.getList(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|