123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="zero">
- <scroll-view scroll-y="true" class="scroll-view">
- <view class="list-scroll-view">
- <view class="one">
- <view class="one_1">
- <text class="iconfont icon-dingweixiao"></text>
- </view>
- <view class="one_2">
- <view class="name">
- <text>{{info.address.name}}</text>
- <text>{{info.address.phone}}</text>
- </view>
- <view class="address">
- <text>{{info.address.province}}</text>
- <text>{{info.address.city}}</text>
- <text>{{info.address.area}}</text>
- <text>{{info.address.address}}</text>
- </view>
- </view>
- </view>
- <view class="two">
- <view class="two_0">
- <text>{{info.status=='0'?'待付款':info.status=='1'?'已支付':info.status=='-1'?'取消订单':info.status=='2'?'发货中':info.status=='-2'?'已退款':info.status=='3'?'已收货':info.status=='-3'?'申请售后':info.status=='-4'?'正在售后中':info.status=='-5'?'售后已结束':'未识别'}}</text>
- </view>
- <view class="two_1" v-if="info.status=='0'">
- <view class="list" v-for="(item,index) in info.goods" :key="index">
- <view class="list_1">
- <text class="iconfont icon-shangdian"></text>
- <text>{{item.shop_name}}</text>
- </view>
- <view class="list_2">
- <view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
- <view class="url">
- <image class="image"
- :src="tag.goods.file&&tag.goods.file.length>0?tag.goods.file[0].url:''"
- mode=""></image>
- </view>
- <view class="goodsname">
- {{tag.goods.name}}
- <view class="specs">
- {{tag.name}}
- </view>
- </view>
- <view class="goodsother">
- <view v-if="info.type=='0'" class="price">
- ¥{{tag.sell_money}}
- </view>
- <view v-else class="price">
- ¥{{tag.group_config.money}}
- </view>
- <view class="num">
- ×{{tag.buy_num}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="two_2" v-else>
- <view class="list_1">
- <text class="iconfont icon-shangdian"></text>
- <text>{{info.shop.name}}</text>
- </view>
- <view class="list_2">
- <view class="goods" v-for="(item,index) in info.goods" :key="index">
- <view class="url">
- <image class="image"
- :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
- mode=""></image>
- </view>
- <view class="goodsname">
- {{item.goods.name}}
- <view class="specs">
- {{item.name}}
- </view>
- </view>
- <view class="goodsother">
- <view v-if="info.type=='0'" class="price">
- ¥{{item.sell_money}}
- </view>
- <view v-else class="price">
- ¥{{item.group_config.money}}
- </view>
- <view class="num">
- ×{{item.buy_num}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="thr">
- <view class="thr_1">
- <text>商品金额</text>
- <text>¥{{info.total_detail.goods_total}}</text>
- </view>
- <view class="thr_1">
- <text>运费</text>
- <text>¥{{info.total_detail.freight_total}}</text>
- </view>
- <view class="thr_1">
- <text>实付金额</text>
- <text>¥{{info.total_detail.freight_total+info.total_detail.goods_total}}</text>
- </view>
- </view>
- <view class="four">
- <view class="four_1">
- <text>订单号</text>
- <text>{{info.no}}</text>
- </view>
- <view class="four_1">
- <text>订单状态</text>
- <text>{{info.status=='0'?'待付款':info.status=='1'?'已支付':info.status=='-1'?'取消订单':info.status=='2'?'发货中':info.status=='-2'?'已退款':info.status=='3'?'已收货':info.status=='-3'?'申请售后':info.status=='-4'?'正在售后中':info.status=='-5'?'售后已结束':'未识别'}}</text>
- </view>
- <view class="four_1">
- <text>下单时间</text>
- <text>{{info.buy_time}}</text>
- </view>
- <view class="four_1">
- <text>订单备注</text>
- <text>{{info.remarks}}</text>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- <view class="zero_1">
- <text>合计</text>
- <text>¥{{info.total_detail.freight_total+info.total_detail.goods_total}}</text>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- status: '',
- info: {}
- };
- },
- onLoad: function(e) {
- const that = this;
- that.$set(that, `id`, e.id);
- that.$set(that, `status`, e.status);
- that.search()
- },
- onShow: function() {},
- methods: {
- // 查询详情
- async search() {
- uni.showLoading({
- title: '加载中'
- });
- const that = this;
- let res;
- // 待付款
- if (that.id && that.status == '0') {
- res = await that.$api(`/order/${that.id}`);
- } else {
- res = await that.$api(`/orderDetail/${that.id}`);
- }
- if (res.errcode == '0') {
- that.$set(that, `info`, res.data);
- uni.hideLoading();
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- background-color: #f5f5f5;
- .zero {
- position: relative;
- flex-grow: 1;
- .one {
- background-color: #fff;
- margin: 0 0 2vw 0;
- display: flex;
- justify-content: space-between;
- padding: 2vw;
- border-bottom: 2px dashed #ff0000;
- .one_1 {
- width: 8vw;
- text-align: center;
- padding: 3vw 0 0;
- }
- .one_2 {
- width: 86vw;
- .name {
- font-size: 16px;
- margin: 0 0 1vw 0;
- text {
- padding: 0 0 0 2vw;
- }
- }
- .address {
- font-size: 14px;
- color: #858585;
- text {
- padding: 0 0 0 2vw;
- }
- }
- }
- }
- .two {
- background-color: #fff;
- margin: 0 0 2vw 0;
- padding: 2vw;
- .two_0 {
- text-align: right;
- color: #ff0000;
- }
- .two_1 {
- display: flex;
- flex-direction: column;
- .list {
- margin: 0 0 1vw 0;
- .list_1 {
- font-size: 16px;
- margin: 0 0 1vw 0;
- text:last-child {
- padding: 0 0 0 2vw;
- }
- }
- .list_2 {
- display: flex;
- flex-direction: column;
- .goods {
- display: flex;
- border-bottom: 1px dashed #f1f1f1;
- padding: 2vw 0;
- .url {
- width: 20vw;
- .image {
- width: 100%;
- height: 20vw;
- border-radius: 5px;
- }
- }
- .goodsname {
- display: flex;
- flex-direction: column;
- width: 60vw;
- padding: 0 2vw;
- font-size: 16px;
- .specs {
- color: var(--f85Color);
- font-size: var(--font12Size);
- }
- }
- .goodsother {
- width: 15vw;
- text-align: right;
- }
- }
- }
- }
- }
- .two_2 {
- .list_1 {
- font-size: 16px;
- margin: 0 0 1vw 0;
- text:last-child {
- padding: 0 0 0 2vw;
- }
- }
- .list_2 {
- display: flex;
- flex-direction: column;
- .goods {
- display: flex;
- border-bottom: 1px dashed #f1f1f1;
- padding: 2vw 0;
- .url {
- width: 20vw;
- .image {
- width: 100%;
- height: 20vw;
- border-radius: 5px;
- }
- }
- .goodsname {
- display: flex;
- flex-direction: column;
- width: 60vw;
- padding: 0 2vw;
- font-size: 16px;
- .specs {
- color: var(--f85Color);
- font-size: var(--font12Size);
- }
- }
- .goodsother {
- width: 15vw;
- text-align: right;
- }
- }
- }
- }
- }
- .thr {
- background-color: #fff;
- margin: 0 0 2vw 0;
- padding: 0 2vw;
- .thr_1 {
- margin: 2vw 0;
- font-size: 15px;
- display: flex;
- justify-content: space-between;
- }
- .thr_1:last-child {
- text:last-child {
- color: #ff0000;
- }
- }
- }
- .four {
- background-color: #fff;
- margin: 0 0 2vw 0;
- padding: 0 2vw;
- .four_1 {
- margin: 2vw 0;
- font-size: 15px;
- display: flex;
- justify-content: space-between;
- }
- }
- }
- .zero_1 {
- background-color: white;
- width: 96vw;
- padding: 4vw 2vw;
- font-size: 16px;
- text:last-child {
- color: #ff0000;
- padding: 0 0 0 2vw;
- }
- }
- }
- .scroll-view {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- .list-scroll-view {
- display: flex;
- flex-direction: column;
- }
- }
- </style>
|