|
@@ -1,14 +1,6 @@
|
|
|
<template>
|
|
|
<mobile-frame>
|
|
|
<view class="main">
|
|
|
- <!-- 已收货查看选择商品物流 -->
|
|
|
- <view class="first" v-if="type == 'order'">
|
|
|
- <view class="first_1">
|
|
|
- <tabs :tabs="goodstabs" @tabsChange="goodstabsChange"></tabs>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 售后,尊荣商品查看物流 -->
|
|
|
- <view class="first" v-else></view>
|
|
|
<view class="second">
|
|
|
<tabs :tabs="tabs" @tabsChange="tabsChange">
|
|
|
<view class="tabsList">
|
|
@@ -19,7 +11,11 @@
|
|
|
</view>
|
|
|
<view class="second_1_1">
|
|
|
<text>物流单号:</text>
|
|
|
- <text>{{no}}</text>
|
|
|
+ <text user-select="true">{{no}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="second_1_1" v-if="type == 'order'">
|
|
|
+ <text>包含商品:</text>
|
|
|
+ <text v-for="(item,index) in goods" :key="index">{{item.goods_name}};</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="second_2">
|
|
@@ -46,17 +42,13 @@
|
|
|
id: '',
|
|
|
// 类型
|
|
|
type: '',
|
|
|
- // 商品选择
|
|
|
- goods: {},
|
|
|
+ // 商品
|
|
|
+ goods: [],
|
|
|
// 标签页
|
|
|
tabs: {
|
|
|
active: '',
|
|
|
menu: []
|
|
|
},
|
|
|
- goodstabs: {
|
|
|
- active: '',
|
|
|
- menu: []
|
|
|
- },
|
|
|
user: {},
|
|
|
info: {},
|
|
|
is_check: '',
|
|
@@ -116,17 +108,27 @@
|
|
|
}
|
|
|
if (res.errcode == '0') {
|
|
|
if (that.type == 'order') {
|
|
|
- for (let [index, val] of res.data.goods.entries()) {
|
|
|
- let num = index + 1
|
|
|
- val.title = `物流` + num;
|
|
|
- val.active = val.goods._id;
|
|
|
+ let res = await that.$api(`/orderDetail/sot`, `POST`, {
|
|
|
+ id: that.id,
|
|
|
+ });
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ for (let [index, item] of res.data.entries()) {
|
|
|
+ let num = index + 1
|
|
|
+ item.title = `物流编号` + num;
|
|
|
+ item.active = item.no
|
|
|
+ }
|
|
|
+ that.$set(that, `goods`, res?.data[0]?.goods)
|
|
|
+ that.$set(that.tabs, `active`, res?.data[0]?.no)
|
|
|
+ that.$set(that.tabs, `menu`, res.data)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
}
|
|
|
- that.$set(that.tabs, `active`, res.data.goods[0].goods._id)
|
|
|
- that.$set(that.goodstabs, `menu`, res.data.goods)
|
|
|
}
|
|
|
that.$set(that, `info`, res.data);
|
|
|
- if (that.type != 'order') that.search();
|
|
|
- if (that.type == 'order') that.goodstabsChange(res.data.goods[0].goods._id, '1')
|
|
|
+ that.search();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.errmsg,
|
|
@@ -237,6 +239,7 @@
|
|
|
}))
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `no`, data.no);
|
|
|
+ that.$set(that, `goods`, data.goods)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '暂无物流信息!',
|
|
@@ -244,39 +247,13 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- // 选择指定商品查信息
|
|
|
- async goodstabsChange(e, type) {
|
|
|
- const that = this;
|
|
|
- let active = '';
|
|
|
- if (type == '1') active = e
|
|
|
- else active = e.active
|
|
|
- that.$set(that.goodstabs, `active`, active)
|
|
|
- let res = await that.$api(`/orderDetail/sot`, `POST`, {
|
|
|
- id: that.info._id,
|
|
|
- goods_id: active
|
|
|
- });
|
|
|
- if (res.errcode == '0') {
|
|
|
- for (let [index, item] of res.data.entries()) {
|
|
|
- item.title = `物流` + index
|
|
|
- item.active = item.no
|
|
|
- }
|
|
|
- that.$set(that.tabs, `active`, res?.data[0]?.no)
|
|
|
- that.$set(that.tabs, `menu`, res.data)
|
|
|
- that.search();
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
// 选择选项卡
|
|
|
tabsChange(e) {
|
|
|
const that = this;
|
|
|
that.$set(that.tabs, `active`, e.active)
|
|
|
+ that.$set(that, `goods`, e?.goods)
|
|
|
that.search()
|
|
|
},
|
|
|
}
|
|
@@ -290,70 +267,7 @@
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
|
|
|
- .first {
|
|
|
- position: relative;
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
- background-color: #ff0000;
|
|
|
-
|
|
|
- .first_1 {
|
|
|
- width: 96vw;
|
|
|
- padding: 2vw;
|
|
|
-
|
|
|
- .picker {
|
|
|
- border: 1px solid #3333;
|
|
|
- border-radius: 5px;
|
|
|
- padding: 2vw;
|
|
|
- background: #fff;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .first_2 {
|
|
|
- display: flex;
|
|
|
- width: 92vw;
|
|
|
- background-color: #fff;
|
|
|
- padding: 2vw;
|
|
|
- margin: 0 2vw;
|
|
|
- border-radius: 7px;
|
|
|
-
|
|
|
- .image {
|
|
|
- width: 22vw;
|
|
|
- height: 22vw;
|
|
|
- }
|
|
|
-
|
|
|
- .other {
|
|
|
- width: 65vw;
|
|
|
- padding: 0 0 0 2vw;
|
|
|
-
|
|
|
- .name {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .other_1 {
|
|
|
- text {
|
|
|
- font-size: 13px;
|
|
|
- color: #858585;
|
|
|
- }
|
|
|
-
|
|
|
- text:last-child {
|
|
|
- color: #000000;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.second {
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- width: 92vw;
|
|
|
- height: 60vh;
|
|
|
- overflow-y: auto;
|
|
|
- background: #fff;
|
|
|
- margin: 0 2vw;
|
|
|
- border-top-left-radius: 5px;
|
|
|
- border-top-right-radius: 5px;
|
|
|
padding: 2vw;
|
|
|
|
|
|
.tabsList {
|