|
@@ -2,32 +2,35 @@
|
|
<view class="pagesCons">
|
|
<view class="pagesCons">
|
|
<view class="tab-body">
|
|
<view class="tab-body">
|
|
<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
|
|
<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
|
|
- <view class="check-order-list" v-for="(item,sindex) in list" :key="item.id"
|
|
|
|
|
|
+ <view class="check-order-list" v-for="item in list" :key="item.id"
|
|
>
|
|
>
|
|
<view class="order-log">
|
|
<view class="order-log">
|
|
- <view v-if="item.orderFlag=='待发货'">待发货</view>
|
|
|
|
|
|
+ <view v-if="item.orderState=='WAIT_SEND'">待发货</view>
|
|
<view v-else>
|
|
<view v-else>
|
|
<view>
|
|
<view>
|
|
- 快递公司:<text class="address-title">{{item.logName}}</text>
|
|
|
|
- <text class="btn-cont" @click="copyLogNum" style="float: right;">确认收货</text>
|
|
|
|
|
|
+ 快递公司:<text class="address-title">{{item.expressName}}</text>
|
|
|
|
+ <u-button v-if="item.expressState=='WAIT_SIGN'"
|
|
|
|
+ :custom-style="btnStyle"
|
|
|
|
+ @click="handleGet(item)"
|
|
|
|
+ type="primary" shape="circle" size="mini" >确认收货</u-button>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
<text>运单编号:</text>
|
|
<text>运单编号:</text>
|
|
- <text>{{item.logNum}}</text>
|
|
|
|
- <u-button @click="copyLogNum" style="margin-left: 20upx;" shape="square" size="mini">复制</u-button>
|
|
|
|
|
|
+ <text>{{item.expressNum}}</text>
|
|
|
|
+ <u-button @click="copyLogNum(item.expressNum)" style="margin-left: 20upx;" shape="square" size="mini">复制</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-gap height="10" bg-color="#f8f8f8"></u-gap>
|
|
<u-gap height="10" bg-color="#f8f8f8"></u-gap>
|
|
- <view class="bundle-list" v-for="row in item.itemList" :key="row.id">
|
|
|
|
|
|
+ <view class="bundle-list" v-for="row in item.orderGoodsList" :key="row.id">
|
|
<view class="img-cont">
|
|
<view class="img-cont">
|
|
- <image :src="row.icon?row.icon:'../../static/goods.png'"></image>
|
|
|
|
|
|
+ <image :src="row.goodsImages"></image>
|
|
</view>
|
|
</view>
|
|
<view >
|
|
<view >
|
|
- <view class="ellipsis-two">{{row.name}}</view>
|
|
|
|
|
|
+ <view class="ellipsis-two">{{row.goodsName}}</view>
|
|
<view class="bundle-num">
|
|
<view class="bundle-num">
|
|
- <view ><text class="price-num">{{row.price}}</text> <text class="price-text">乐豆</text></view>
|
|
|
|
- <view >X {{row.number}}</view>
|
|
|
|
|
|
+ <view ><text class="price-num">{{row.payGold}}</text> <text class="price-text">乐豆</text></view>
|
|
|
|
+ <view >X {{row.buyQty}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -39,55 +42,38 @@
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
- <!-- 查看物流弹窗 -->
|
|
|
|
- <view>
|
|
|
|
- <u-modal v-model="isShow" :show-title="false" confirm-text="好的">
|
|
|
|
- <view class="slot-content">
|
|
|
|
- <view>
|
|
|
|
- 快递公司:{{logData.logName}}
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- 运单编号:{{logData.logNum}}
|
|
|
|
- <u-button @click="copyLogNum" style="margin-left: 20upx;" shape="square" size="mini">复制</u-button>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </u-modal>
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { queryOrderExpress } from '@/api/order.js'
|
|
|
|
|
|
+ import { queryOrderExpress, finishOrder } from '@/api/order.js'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ btnStyle:{
|
|
|
|
+ width: '180rpx',
|
|
|
|
+ fontSize: '30rpx',
|
|
|
|
+ float: 'right'
|
|
|
|
+ },
|
|
isShow: false, // 是否显示物流弹框
|
|
isShow: false, // 是否显示物流弹框
|
|
status: 'loadmore',
|
|
status: 'loadmore',
|
|
noDataText: '暂无数据',
|
|
noDataText: '暂无数据',
|
|
- current: 0,
|
|
|
|
- swiperCurrent: 0,
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
list: [],
|
|
list: [],
|
|
- logData: { // 物流信息
|
|
|
|
- logName: '韵达快递',
|
|
|
|
- logNum: 12356544544
|
|
|
|
- },
|
|
|
|
total: 0,
|
|
total: 0,
|
|
- action: 'swiperChange', // 操作类型,上划分页,或左右滑动
|
|
|
|
|
|
+ orderSn: '' // 订单编号
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
- if(option.id) {
|
|
|
|
- this.getRow(option.id)
|
|
|
|
|
|
+ if(option.orderNo) {
|
|
|
|
+ this.orderSn = option.orderNo
|
|
|
|
+ this.getRow()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// scroll-view到底部加载更多
|
|
// scroll-view到底部加载更多
|
|
onreachBottom() {
|
|
onreachBottom() {
|
|
- this.action = 'onreachBottom'
|
|
|
|
if (this.list.length < this.total) {
|
|
if (this.list.length < this.total) {
|
|
this.pageNo += 1
|
|
this.pageNo += 1
|
|
this.getRow()
|
|
this.getRow()
|
|
@@ -100,9 +86,9 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查询列表
|
|
// 查询列表
|
|
- getRow(id) {
|
|
|
|
|
|
+ getRow() {
|
|
this.status = "loading"
|
|
this.status = "loading"
|
|
- queryOrderExpress({id:id}).then(res => {
|
|
|
|
|
|
+ queryOrderExpress({orderSn:this.orderSn}).then(res => {
|
|
console.log(res,'rrrrrrrr')
|
|
console.log(res,'rrrrrrrr')
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.list = res.data || []
|
|
this.list = res.data || []
|
|
@@ -114,17 +100,40 @@
|
|
this.status = "loadmore"
|
|
this.status = "loadmore"
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 确认收货
|
|
|
|
+ handleGet(item) {
|
|
|
|
+ console.log(item,'iiiiiiiiii')
|
|
|
|
+ let params = {
|
|
|
|
+ "expressNo": item.expressNum,
|
|
|
|
+ "orderNo": item.orderNo,
|
|
|
|
+ }
|
|
|
|
+ finishOrder(params).then(res=>{
|
|
|
|
+ if(res.status==200) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:res.message,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ this.getRow()
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:res.message,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
// 复制运单编号
|
|
// 复制运单编号
|
|
- copyLogNum () {
|
|
|
|
|
|
+ copyLogNum (logNum) {
|
|
// H5 不支持
|
|
// H5 不支持
|
|
uni.setClipboardData({
|
|
uni.setClipboardData({
|
|
- data: this.logData.logNum,
|
|
|
|
|
|
+ data: logNum,
|
|
success: function(res) {
|
|
success: function(res) {
|
|
uni.getClipboardData({
|
|
uni.getClipboardData({
|
|
success: function(res) {
|
|
success: function(res) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '已复制到剪贴板'
|
|
|
|
|
|
+ title: '已复制到剪贴板',
|
|
|
|
+ icon: 'none'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -238,6 +247,7 @@
|
|
&:last-child {
|
|
&:last-child {
|
|
flex: 1;
|
|
flex: 1;
|
|
margin-left: 20upx;
|
|
margin-left: 20upx;
|
|
|
|
+ padding: 10upx 0upx;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -252,10 +262,10 @@
|
|
width: 180upx;
|
|
width: 180upx;
|
|
height: 60upx;
|
|
height: 60upx;
|
|
float: right;
|
|
float: right;
|
|
- background-color: #2979ff;
|
|
|
|
- color: #fff;
|
|
|
|
- text-align: center;
|
|
|
|
- border-radius: 100upx;
|
|
|
|
|
|
+ // background-color: #2979ff;
|
|
|
|
+ // color: #fff;
|
|
|
|
+ // text-align: center;
|
|
|
|
+ // border-radius: 100upx;
|
|
font-size: 30upx;
|
|
font-size: 30upx;
|
|
}
|
|
}
|
|
.price-text{
|
|
.price-text{
|