345 lines
7.6 KiB
Vue
345 lines
7.6 KiB
Vue
<template>
|
||
<view class="center">
|
||
<view class="top">
|
||
<!-- -->
|
||
</view>
|
||
<view class='list'>
|
||
<block>
|
||
<view class='item' v-for="(item,index) in shopList" :key="index">
|
||
<view v-for="(items,index) in item.orderProduct" :key="index">
|
||
<view class='title acea-row row-between-wrapper'>
|
||
<view class="acea-row row-middle left-wrapper">
|
||
{{item.merchant.mer_name}}
|
||
</view>
|
||
</view>
|
||
<view>
|
||
<view>
|
||
<block>
|
||
<view class='item-info acea-row row-between row-top'>
|
||
<view class='pictrue'>
|
||
<image :src="item.orderProduct[index].cart_info.product.image">
|
||
</image>
|
||
</view>
|
||
<view class='text acea-row row-between'>
|
||
<view class='name line2'>
|
||
{{items.cart_info.product.store_name}}
|
||
</view>
|
||
<view class='name line2'>¥{{items.cart_info.product.price}}</view>
|
||
<view class='name line2'>x {{items.product_num}}</view>
|
||
<view class='bnt b-color' v-if="items.is_imported == 0"
|
||
@click="importshop(items.order_id,items.product_id,items.product_sku)">
|
||
立即导入</view>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
<view class='totalPrice'>
|
||
共1件商品,总金额
|
||
<text class='money'>¥{{items.product_price}}</text>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
<u-popup :show="show" @close="close" mode="center" bgColor='transparent'>
|
||
<image src="@/static/images/xianshang.png" mode="widthFix"></image>
|
||
<view class="popen">
|
||
<h4>{{title}}</h4>
|
||
<view class="shuru">
|
||
点击返回,商品管理
|
||
</view>
|
||
<view class="btn">
|
||
<button class="btn_l" @click="close()">取消</button>
|
||
<button class="btn_r" @click="getback()">确定</button>
|
||
</view>
|
||
</view>
|
||
</u-popup>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
getPreviewProDetail,
|
||
} from '@/api/store.js'
|
||
import {
|
||
postImport
|
||
} from '@/api/product.js'
|
||
import {
|
||
getOrderList
|
||
} from '@/api/order.js'
|
||
export default {
|
||
data() {
|
||
return {
|
||
shopList: [],
|
||
shopinfo: {},
|
||
mer_id: '',
|
||
keyword: '',
|
||
where: {
|
||
page: 1,
|
||
limit: 10,
|
||
status: 2,
|
||
product_type: 98
|
||
},
|
||
data: {
|
||
product_id: '',
|
||
unique: "",
|
||
order_id: '',
|
||
order_product_id: '',
|
||
order_unique: ''
|
||
},
|
||
show: false,
|
||
title:''
|
||
}
|
||
},
|
||
onLoad(option) {
|
||
console.log(option);
|
||
this.mer_id = option.mer_id
|
||
this.getList(this.mer_id);
|
||
this.data.product_id = option.product_id
|
||
this.data.unique = option.unique
|
||
},
|
||
methods: {
|
||
getList: function(mer_id) {
|
||
getOrderList(this.where, this.mer_id).then(res => {
|
||
console.log(res);
|
||
this.shopList = res.data.list
|
||
console.log(this.shopList);
|
||
})
|
||
// getPreviewProDetail({
|
||
// id:product_id,
|
||
// product_type:0,
|
||
// }).then(
|
||
// res => {
|
||
// console.log(res);
|
||
|
||
// console.log(this.shopList);
|
||
// },
|
||
// error => {
|
||
// that.$util.Tips({
|
||
// title: error.msg
|
||
// })
|
||
// }
|
||
// );
|
||
},
|
||
importshop(order_id, product_id, unique) {
|
||
this.data.order_id = order_id
|
||
this.data.order_product_id = product_id
|
||
this.data.order_unique = unique
|
||
this.show = true
|
||
postImport(this.mer_id, this.data).then(res => {
|
||
console.log(res);
|
||
this.title=res.message
|
||
this.$util.Tips({
|
||
title: res.message
|
||
})
|
||
})
|
||
},
|
||
close() {
|
||
this.show = false
|
||
},
|
||
getback(){
|
||
uni.navigateBack({
|
||
delta: 1
|
||
});
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.top {
|
||
background-color: red;
|
||
height: 55px;
|
||
|
||
.input {
|
||
width: 90%;
|
||
margin: auto !important;
|
||
padding-top: 10px !important;
|
||
}
|
||
}
|
||
|
||
.list {
|
||
width: 690rpx;
|
||
margin: 14rpx auto 0 auto;
|
||
|
||
.title {
|
||
height: 84rpx;
|
||
padding: 0 30rpx;
|
||
border-bottom: 1px solid #eee;
|
||
font-size: 28rpx;
|
||
color: #282828;
|
||
|
||
.left-wrapper {
|
||
.iconfont {
|
||
margin-top: 5rpx;
|
||
}
|
||
|
||
.store-name {
|
||
margin: 0 10rpx;
|
||
}
|
||
|
||
.icon-xiangyou {
|
||
font-size: 20rpx;
|
||
}
|
||
}
|
||
|
||
.sign {
|
||
font-size: 24rpx;
|
||
padding: 0 7rpx;
|
||
height: 36rpx;
|
||
margin-right: 15rpx;
|
||
}
|
||
}
|
||
|
||
.item {
|
||
background-color: #fff;
|
||
margin: 5px 0 5px 0;
|
||
|
||
.item-info {
|
||
padding: 0 30rpx;
|
||
margin-top: 22rpx;
|
||
|
||
.pictrue {
|
||
width: 120rpx;
|
||
height: 120rpx;
|
||
|
||
image {
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 6rpx;
|
||
}
|
||
}
|
||
|
||
.text {
|
||
width: 486rpx;
|
||
font-size: 28rpx;
|
||
color: #999;
|
||
margin-top: 6rpx;
|
||
position: relative;
|
||
|
||
.name {
|
||
width: 320rpx;
|
||
color: #282828;
|
||
}
|
||
|
||
.money {
|
||
text-align: right;
|
||
float: right;
|
||
|
||
}
|
||
|
||
.bnt {
|
||
position: absolute;
|
||
right: 10px;
|
||
bottom: 0px;
|
||
right: 10px;
|
||
width: 176rpx;
|
||
height: 60rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 50rpx;
|
||
font-size: 27rpx;
|
||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||
color: white;
|
||
|
||
}
|
||
}
|
||
}
|
||
|
||
.event_name {
|
||
display: inline-block;
|
||
margin-right: 9rpx;
|
||
color: #fff;
|
||
font-size: 20rpx;
|
||
padding: 0 8rpx;
|
||
line-height: 30rpx;
|
||
text-align: center;
|
||
border-radius: 6rpx;
|
||
}
|
||
|
||
.event_ship {
|
||
font-size: 20rpx;
|
||
margin-top: 10rpx;
|
||
}
|
||
|
||
.totalPrice {
|
||
font-size: 26rpx;
|
||
color: #282828;
|
||
text-align: right;
|
||
margin: 27rpx 0 0 30rpx;
|
||
padding: 0 30rpx 30rpx 0;
|
||
|
||
.money {
|
||
font-size: 34rpx;
|
||
font-weight: bold;
|
||
color: rgb(233, 51, 35);
|
||
}
|
||
}
|
||
|
||
.bottom {
|
||
height: 107rpx;
|
||
padding: 0 30rpx;
|
||
border-top: 1px solid #f0f0f0;
|
||
|
||
|
||
}
|
||
}
|
||
|
||
.event_price {
|
||
margin: 0 0 50rpx 120rpx;
|
||
}
|
||
}
|
||
|
||
.popen {
|
||
position: absolute;
|
||
top: 110px;
|
||
width: 100%;
|
||
margin: auto;
|
||
padding: 10px;
|
||
|
||
h4 {
|
||
font-weight: 400;
|
||
font-size: 20px;
|
||
padding: 5px;
|
||
text-align: center;
|
||
}
|
||
|
||
.guige {
|
||
margin: 10px 0 10px 20px;
|
||
}
|
||
|
||
.shuru {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
font-size: 18px;
|
||
padding: 5px;
|
||
|
||
}
|
||
|
||
.btn {
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
margin: 10px;
|
||
|
||
.btn_l {
|
||
padding: 5px;
|
||
width: 100px;
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.btn_r {
|
||
width: 100px;
|
||
padding: 5px;
|
||
border-radius: 4px;
|
||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||
border-radius: 27px 27px 27px 27px;
|
||
color: white;
|
||
}
|
||
}
|
||
}
|
||
</style> |