['我的数权挪过来了‘]

This commit is contained in:
2021-09-16 13:43:47 +08:00
parent 6946d6bc82
commit e8dd09c0a1
14 changed files with 4253 additions and 298 deletions

View File

@@ -0,0 +1,140 @@
/**
* Web-zdx
* moduleName: 我的数权
*/
import request from '../request.js'
// 我的数权
const mallWarrants = (data) => {
return request({
url: 'mall/warrants',
method: 'GET',
data: data
})
}
// 我的数权Id获取数权详情
const mallWarrantsList = (symbol) => {
return request({
url: 'mall/warrants/exchange',
method: 'GET',
data: {
symbol:symbol
}
})
}
// 确认提货
const mallWarrantsSure = (data) => {
return request({
url: 'mall/warrants/exchange',
method: 'POST',
data: data
})
}
// 我的邮寄订单,我的提货单
const mallShipmentsPostShop = (apiUrl,data) => {
return request({
url: apiUrl,
method: 'GET',
data: data
})
}
// 根据提货单的no 获取提货单的详情
const mallShipmentsInfo = (no) => {
return request({
url: 'mall/shipments/'+no,
method: 'GET'
})
}
// 取消提货单
const mallShipmentsCancel = (shipmentNo) => {
return request({
url: 'mall/shipments/'+ shipmentNo+'/cancel',
method: 'POST'
})
}
// 签收提货单
const mallShipmentsSign = (shipmentNo) => {
return request({
url: 'mall/shipments/'+ shipmentNo+'/sign',
method: 'POST'
})
}
// 退货单申请退货
const mallShipmentsRefund = (data) => {
return request({
url: 'mall/shipments/'+ data.shipment_no+'/refund',
method: 'POST',
data:data
})
}
// 退货单申请退货前置条件
const mallShipmentsRefundInfo = (shipmentNo) => {
return request({
url: 'mall/shipments/'+ shipmentNo+'/refund',
method: 'GET'
})
}
// 查看物流接口
const mallShipmentsLogistic = (shipmentNo) => {
return request({
url: 'mall/shipments/'+ shipmentNo+'/logistic',
method: 'GET'
})
}
// 我的退货单 mall/refunds
const mallRefunds = (data) => {
return request({
url: 'mall/refunds',
method: 'GET',
data: data
})
}
//退货单详情页
const mallRefundsInfo = (no) => {
return request({
url: 'mall/refunds/'+no,
method: 'GET'
})
}
// 确认退货mall/refunds/{refund}/deliver
const mallRefundsDeliver = (data) => {
return request({
url: 'mall/refunds/'+data.refund+'/deliver',
method: 'POST',
data:data
})
}
// 提货单或者服务单生成提货二维码
const mallWarrantsQrcode = (data) => {
return request({
url: 'mall/warrants/qrcode',
method: 'GET',
data:data
})
}
export {
mallWarrants,
mallWarrantsList,
mallWarrantsSure,
mallShipmentsPostShop,
mallShipmentsInfo,
mallShipmentsCancel,
mallShipmentsSign,
mallShipmentsRefund,
mallShipmentsRefundInfo,
mallShipmentsLogistic,
mallRefunds,
mallRefundsInfo,
mallRefundsDeliver,
mallWarrantsQrcode
}

View File

@@ -0,0 +1,176 @@
<template>
<view class="OrderTemplate" >
<view class="top" >
<view class="company">
<view class="company-logo">
<image :src="item.shop.cover" mode="aspectFill" />
<view class="name ellipsis">{{item.shop.name}}</view>
</view>
<view class="flexrow">
<view class="no ellipsis">区块链地址 {{item.account.addr}}</view> <span class="copy" @click="copy(item.account.addr)">复制</span>
</view>
</view>
</view>
<view class="goods-info" @click="goDetail(item.goods.goods_id)">
<image class="goods-img" :src="item.goods.cover" mode="aspectFill" />
<view class="goods">
<view class="name">
<view class="name1 ellipsis-2">{{item.goods.goods_name}}</view>
<!-- <span>{{item.account.balance}}</span> -->
</view>
<view class="sku">数权个数 <span>x {{item.account.balance}}</span> </view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "OrderTemplate",
data() {
return {
};
},
props:{
item:Object
},
onShow() {
console.log(this.item,'onshow,numtempa')
},
methods: {
// 跳转到商品详情页面
goDetail(id) {
uni.navigateTo({
url: '/pages/goods/detail?id='+id
})
},
// 复制
copy(e){
uni.setClipboardData({
data: e,
success: res=>{
console.log('res',res)
}
})
}
}
}
</script>
<style lang="scss" scoped>
// 顶部信息
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-bottom: 20rpx;
border-bottom: solid 1rpx #f7f7f7;
.company-logo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.name {
width: 600rpx;
font-size: 30rpx;
color: #484848;
font-weight: bold;
}
}
.no {
margin-top: 10rpx;
font-size: $title-size*0.8;
color: #999;
width: 500rpx;
}
.status {
color: #999;
font-size: $title-size;
}
}
// 商品信息
.goods-info {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 36rpx;
.goods-img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.goods {
flex: 1;
margin-left: 20rpx;
margin-bottom: 10rpx;
.name {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
// font-weight: bold;
.name1 {
// width: 340rpx;
}
span {
font-size: 32rpx;
font-weight: normal;
}
}
.sku {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
}
}
.flexrow{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
.copy{
color: $main-color;
font-size: $title-size*0.8;
font-weight: 400;
padding: 0 30rpx;
}
}
</style>

View File

@@ -55,6 +55,32 @@
"navigationBarBackgroundColor": "#e93340"
}
}, {
"path": "pages/property/order/numberWeight",
"name": "NumberWeight",
"style": {
"navigationBarTitleText": "我的权证",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#e93340"
}
},
{
"path": "pages/property/order/numberWeightInfo",
"name": "NumberWeightInfo",
"style": {
"navigationBarTitleText": "我的详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#e93340"
}
},{
"path": "pages/property/order/mallShipments",
"name": "MallShipments",
"style": {
"navigationBarTitleText": "已提货列表",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#e93340"
}
},
{
"path": "pages/goods/details",
"name": "goodsDetails",
"style": {
@@ -321,7 +347,8 @@
"navigationBarTitleText": "创建门店/部门",
"navigationBarBackgroundColor": "#FFFFFF"
}
}],
}
],
"tabBar": {
"color": "#bababa",
"selectedColor": "#e93340",

View File

@@ -58,11 +58,11 @@
</view>
<!-- 我的权证 -->
<view class="user-group">
<view class="title">
<view class="title" >
<view class="title-text">我的权证</view>
</view>
<view class="group-flex group-flex-4">
<view class="item">
<view class="item" @click="$Router.push({name:'NumberWeight'})">
<view class="item-num">0</view>
<view class="item-title">权证持有</view>
</view>

View File

@@ -0,0 +1,174 @@
<template>
<view class="LogisticsIndex">
<block v-if="list.length>0">
<view class="logistics-top">
<view>{{express.express_name}} <span class="copy" @click='copy(express.express_no)'>复制单号</span></view>
<view><span>快递编号</span>{{express.express_no}} </view>
</view>
<view class="Logistics-content">
<view>物流追踪</view>
<view class="list">
<view class="list-item" v-for="(item,index) in list" :key='index'>
<view :class="['dian',index === 0 ?'dian-active':'']"></view>
<view :class="['content',index === 0?'content-active':'']">
<view class=""><span style='padding-right: 10rpx;'>{{item.status}} - </span>{{item.context}}
</view>
<view class="date"> {{item.time}} </view>
</view>
</view>
</view>
</view>
</block>
<!-- 没有订单列表 -->
<no-list v-if="list.length === 0" name='no-addr' txt="暂无任务物流进度信息~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
mallShipmentsLogistic
} from '@/apis/interfaces/numberWeight'
export default {
data() {
return {
list: [],
no: '', // 快递单号
express:{},// 地址信息
}
},
onLoad(e) {
this.no = e.no
this.getLogistic(this.no)
},
methods: {
getLogistic(no) {
mallShipmentsLogistic(no).then(res => {
console.log(res)
this.list = res.logistics
this.express = res.express
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
// 复制
copy(no) {
uni.setClipboardData({
data: no,
success: res=>{
console.log('success');
console.log(res)
}
});
},
}
}
</script>
<style lang="scss">
page {
background-color: #F8F8F8;
}
.LogisticsIndex {
font-size: $title-size;
color: $text-color-333;
margin-top: 20rpx;
// 物流名称
.logistics-top {
background-color: #fff;
padding: 30rpx 50rpx;
margin-bottom: 20rpx;
view:nth-child(2) {
padding-top: $padding * 0.5;
font-size: 0.9*$title-size;
}
.copy {
display: inline-block;
padding: $padding *0.4 $padding;
background-color: $main-color;
margin-left: 30rpx;
color: #fff;
font-size: $title-size *0.8;
border-radius: 6rpx;
}
}
// 物流进度
.Logistics-content {
background-color: #fff;
padding: 30rpx 50rpx;
margin: 50rpx 0;
.list {
margin-top: $margin*2;
margin-left: 20rpx;
.list-item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
box-sizing: border-box;
position: relative;
border-left: solid 2rpx #cacaca;
padding-bottom: $margin*1.6;
&:last-child {
border-left: solid 2rpx #fff !important;
}
&:first-child {
color: $main-color !important;
}
.dian {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: #cacaca;
border: solid 10rpx rgba($color:#cacaca, $alpha: 0.3);
position: relative;
left: -11rpx;
}
.dian-active {
background-color: $main-color;
width: 30rpx;
height: 30rpx;
left: -16rpx;
border: solid 10rpx rgba($color: $main-color, $alpha: 0.3);
box-shadow: 0 0 20rpx 4rpx rgba($color: $main-color, $alpha: 0.5);
}
.content {
flex: 1;
margin-left: 60rpx;
// padding: 10rpx 0;
font-size: $title-size * 0.9;
color: $text-color-666;
position: relative;
top: -10rpx;
.date {
margin-top: $margin;
}
}
.content-active {
color: $main-color;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,326 @@
<template>
<view class="NumberWeight">
<!-- 订单分类 -->
<scroll-view class="nav" scroll-x="true" :scroll-into-view='selectCategoryId' scroll-with-animation="true">
<view :class="['nav-item' ,selectNavId === item.id?'nav-item-selected':'']" v-for="(item,index) in navList"
:key="index" @click="selectNav(item.id)">
{{item.name}}
{{item.id ==='apply' && count.apply >0 ? '('+count.apply + ')':''}}
{{item.id ==='deliver' && count.deliver >0 ?'('+count.deliver + ')':''}}
{{item.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
{{item.id ==='signed' && count.signed >0 ?'('+count.signed + ')':''}}
{{item.id ==='process' && count.process >0 ?'('+count.process + ')':''}}
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
</view>
</scroll-view>
<!-- 有订单列表 -->
<view class="" v-if="lists.length > 0">
<!-- 订单列表 -->
<view class="order-list" v-for="(item,index) in lists" :key="index">
<MallRefundsTemplate :item="item" />
<view class="actions">
<view @click="goDetail(item.refund_id)" class="nowPay">查看详情</view>
</view>
</view>
</view>
<!-- 没有订单列表 -->
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
MallRefundsTemplate
} from '@/components/mall-refunds-template/mall-refunds-template'
import { mallRefunds } from '@/apis/interfaces/numberWeight'
export default {
components: {
MallRefundsTemplate
},
data() {
return {
lists: [],
page:1,
total:0,
navList: [{
name: '待审核',
id: 'apply'
},{
name: '待返货',
id: 'deliver'
},{
name: '待签收',
id: 'delivered'
},{
name: '已签收',
id: 'signed'
},
{
name: '待退数权',
id: 'process'
},
{
name: '完成退货',
id: 'completed'
}
],
selectNavId: 'apply',
count:{}
};
},
onLoad() {
this.getList()
},
onShow(){
console.log(uni.getStorageSync('refresh'),'getStorageSync')
if(uni.getStorageSync('refresh')){
this.reset()
}
},
onUnload() {
uni.setStorageSync('refresh',false)
},
onReachBottom() {
if(this.total>this.lists.length){
this.page = this.page + 1
this.getList()
}else{
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'error',icon:false,
duration: 3000
})
}
},
methods: {
reset(){
this.page =1
this.total = 0
this.lists = []
this.getList()
uni.setStorageSync('refresh',false)
},
// 选择订单
selectNav(id) {
if (this.selectNavId !== id) {
this.selectNavId = id
this.reset()
}
},
// 获取订单列表
getList(){
let data = {
pageSize:20,
page:this.page,
state:this.selectNavId
}
mallRefunds(data).then(res=>{
console.log(res)
this.count = res.count
this.lists = this.lists.concat(res.lists.data)
this.total = res.lists.page.total
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
// 取消提货单
nowCancel(index,no){
console.log(index,no)
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
success: (res) =>{
if (res.confirm) {
mallShipmentsCancel(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.lists.splice(index,1)
this.total = this.total - 1
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 签收提货单
nowSign(index,no){
console.log(index,no)
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认已经收到商品了呀',
success: (res) =>{
if (res.confirm) {
console.log(no)
mallShipmentsSign(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.lists.splice(index,1)
this.total = this.total - 1
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 查看详情
goDetail(no){
this.$Router.push({
name: 'MallRefundsInfo',
params:{
no:no
}
})
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.NumberWeight {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
// 订单nav
.nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
white-space: nowrap;
font-size: $title-size*0.95;
padding: 0 30rpx;
background-color: #fff;
color: #666;
border-top: solid 20rpx #f7f7f7;
position: sticky;
top: 0rpx;
z-index: 1;
.nav-item {
display: inline-block;
border-bottom: solid 4rpx #fff;
padding: 30rpx 10rpx;
margin-right: 10rpx;
}
.nav-item-selected {
border-bottom: solid 4rpx $main-color;
color: $main-color;
}
}
// 订单列表
.order-list {
background-color: #fff;
border-radius: 20rpx;
min-height: 300rpx;
margin: 30rpx 20rpx 0 20rpx;
padding:30rpx 30rpx 20rpx 30rpx ;
// border-top: solid 4rpx #cacaca;
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 28rpx;
color: #fff;
border-top: solid 1rpx #EFF4F2;
.nowPay {
padding: 4rpx 20rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
// background-color: $main-color;
color: #999;
border:solid 1rpx #cacaca;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,720 @@
<template>
<view class="OrderInfo">
<!-- 订单状态 -->
<view class="order-status">
<view class="info">
{{info.state.text}}
<span>{{info.state.remark}}</span>
</view>
<image src="/static/images/fire.png" mode="widthFix"></image>
</view>
<!-- 收货人 -->
<view class="acceptInfo" v-if="type === '2'">
<block>
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
<view class="address">
<u-icon name="map" color="red"></u-icon>
<span>{{address.full_address}}</span>
</view>
</block>
</view>
<view class="goods-info1">
<view class="top">
<view class="company">
<view class="company-logo">
<image :src="info.shop.cover" mode="aspectFill" />
<view class="name ellipsis">{{info.shop.name}}</view>
</view>
<view class="flexrow">
<view class="no ellipsis">退后单号 {{info.refund_no}}</view>
</view>
</view>
</view>
<view class="goods-info">
<image class="goods-img" :src="info.goods_sku.cover" mode="aspectFill" />
<view class="goods">
<view class="name">
<view class="name1 ellipsis-2">{{info.goods_sku.goods_name}}</view>
<!-- <span>16.80</span> -->
</view>
<view class="sku">数权个数 <span>x {{info.qty}}</span> </view>
</view>
</view>
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+info.goods_sku.goods_id'>
<view class="total-btn">再次购买</view>
</navigator>
<view class="goods-type">创建退货时间 <span>{{info.created_at}}</span></view>
<view class="goods-type">运费 <span>自行承担运费</span></view>
<view class="goods-type">退货数量 <span>
<u-number-box v-model="info.qty" :disabled="true"></u-number-box>
</span></view>
<view class="goods-type">退货方式<span>快递退回</span></view>
<block v-if="info.can.user_deliver">
<view class="goods-type-1">物流公司
<u-input v-model="company" placeholder='请输入退货物流公司' />
</view>
<view class="goods-type-1">物流单号
<u-input v-model="number" placeholder='请输入物流单号' />
</view>
</block>
</view>
<!-- 操作相关 -->
<view class="actions">
<view @click="showLogs = true" class="nowPay">查看退货日志</view>
<view v-if="info.can.user_deliver" @click="nowRefunds(refund_id)" class="nowPay">确认退货</view>
</view>
<!-- 显示 -->
<u-popup v-model="showLogs" mode="bottom" border-radius="14">
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView" v-if="logs.length>0">
<view class="coupon-title">退货操作进度 </view>
<view class="list">
<view class="list-item" v-for="(item,index) in logs" :key='index'>
<view :class="['dian',index === 0 ?'dian-active':'']"></view>
<view :class="['content',index === 0?'content-active':'']">
<view class="title">{{item.state_text?item.state_text:'当前状态不明确,需后台返回'}}</view>
<view class="des">退货原因{{item.title || '无理由'}} 退货备注{{item.remark || '无备注'}}</view>
<view class="pictures">
<image @click="priveImg(index,idx)" v-for="(it,idx) in item.pictures" :key='idx' :src="it" mode="aspectFill" />
</view>
<view class="date"> {{item.created_at}} </view>
</view>
</view>
</view>
<!-- 没有优惠券列表 -->
<no-list v-if="logs.length === 0" name='no-news' txt="没有任何退货进度信息哦~" />
</scroll-view>
</u-popup>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
mallRefundsInfo,
mallRefundsDeliver
} from '@/apis/interfaces/numberWeight'
export default {
name: 'OrderInfo',
data() {
return {
info: {},
qty: 1,
refund_id: '', // 退货单no
company: '',
number: '',
logs: [],
showLogs: false // 默认不显示记录信息
};
},
onLoad(e) {
this.refund_id = e.no
this.getInfo(e.no)
},
onShow() {
if (uni.getStorageSync('refresh')) {
this.getInfo(this.refund_id)
}
},
methods: {
// 获取退货的基本信息
getInfo(refund_id) {
mallRefundsInfo(refund_id).then(res => {
this.info = res
this.logs = res.log
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
priveImg(index,idx){
console.log(this.logs[index].pictures);
uni.previewImage({
current:idx,
urls:this.logs[index].pictures
})
},
// 确认退货
nowRefunds(no) {
let data = {
refund: this.refund_id,
company: this.company,
number: this.number,
}
if (data.company === '') {
this.$refs.uToast.show({
title: '请核对物流公司名称',
type: 'error',icon:false,
duration: 3000
})
return;
}
if (data.number === '') {
this.$refs.uToast.show({
title: '请核对物流单号',
type: 'error',icon:false,
duration: 3000
})
return;
}
uni.showModal({
title: '哎呦,提醒你',
content: '是否确退货信息准确无误呀',
success: (res) => {
if (res.confirm) {
mallRefundsDeliver(data).then(res => {
console.log(res)
this.$refs.uToast.show({
title: res,
type: 'error',icon:false,
duration: 3000
})
this.getInfo(data.refund)
uni.setStorageSync('refresh', true)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title: '放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.OrderInfo {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
padding-bottom: 80rpx;
.order-status {
width: 100%;
height: 300rpx;
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
color: #Fff;
font-size: 36rpx;
padding: 30rpx 50rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.info {
font-size: 36rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
span {
font-size: 28rpx;
padding-top: 30rpx;
}
}
image {
width: 200rpx;
}
}
.acceptInfo {
margin: 0 30rpx;
background-color: #fff;
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
border-radius: 20rpx;
padding: 30rpx;
position: relative;
top: -30rpx;
.name {
font-size: 36rpx;
font-weight: 600;
span {
padding-left: 20rpx;
font-size: 30rpx;
}
}
.address {
padding-top: 20rpx;
font-size: 28rpx;
span {
margin-left: 10rpx;
}
}
}
.goods-info1 {
padding: 20rpx 40rpx;
background-color: #fff;
.goods-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
}
.goods-type-1 {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
u-input {
flex: 1;
margin-left: 50rpx;
}
}
.goods-type-address {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
u-icon {
padding-left: 20rpx;
}
}
// 顶部信息
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #EFF4F2;
.company-logo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.name {
width: 600rpx;
font-size: 30rpx;
color: #484848;
font-weight: bold;
}
}
.no {
margin-top: 16rpx;
font-size: $title-size*0.8;
color: #999;
// width: 500rpx;
}
.status {
color: #999;
font-size: $title-size;
}
}
// 商品信息
.goods-info {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 40rpx;
.goods-img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.goods {
flex: 1;
margin-left: 20rpx;
.name {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
// font-weight: bold;
.name1 {
width: 500rpx;
}
span {
font-size: 34rpx;
font-weight: normal;
}
}
.sku {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
}
}
// 合计信息
.total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
font-size: 26rpx;
color: $main-color;
flex: 1;
text-align: right;
margin-top: 20rpx;
padding-bottom: 30rpx;
}
.total-btn {
border: solid 1rpx $main-color;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
background-color: #fff;
flex: 1;
font-size: 28rpx;
padding: 20rpx 50rpx 30rpx 50rpx;
color: #fff;
.nowPay {
padding: 4rpx 20rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
// background-color: $main-color;
color: #999;
border: solid 1rpx #cacaca;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
.flexrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
.copy {
color: $main-color;
font-size: $title-size*0.8;
font-weight: 400;
padding: 0 30rpx;
}
}
.no-address {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
// 优惠券弹窗
.scrollView {
// padding: 40rpx;
box-sizing: border-box;
position: relative;
// 标题
.coupon-title {
padding: 40rpx;
font-weight: bold;
font-size: 40rpx;
border-bottom: solid 1rpx #f7f7f7;
}
// 优惠券样式
.coupon-list-item {
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
width: 100%;
padding: 20rpx 50rpx;
.coupon-item {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding-top: 10rpx;
}
}
}
.list-top1 {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: $title-size*0.94;
width: 100%;
margin-left: 0 !important;
margin-top: 30rpx;
.shop-info {
margin-left: 20rpx;
}
.list-top1-img {
width: 170rpx;
height: 170rpx;
border-radius: 10rpx;
}
.des {
font-size: 28rpx;
}
.title {
font-size: 32rpx;
}
}
.list-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
font-size: $title-size*0.94;
border-bottom: solid 1rpx #f7f7f7;
width: 600rpx;
margin-left: 30rpx;
.list-top-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.shop-info {
flex: 1;
}
.title {
width: 380rpx;
font-size: $title-size*1;
font-weight: 400;
}
.urate {
padding: 10rpx 0;
}
.des {
// padding-top: $padding*0.8;
font-size: $title-size * 0.8;
color: #999;
span {
color: #666;
padding: 0 10rpx;
}
}
.list-banner {
width: 120rpx;
margin-right: $margin*1.5;
height: 120rpx;
border-radius: 4rpx;
}
}
.list-top-right {
border: solid 1rpx $main-color;
color: $main-color;
display: inline-block;
padding: 8rpx 16rpx;
font-size: $title-size *0.8;
border-radius: 4rpx;
}
}
.list {
margin-top: $margin*2;
margin-left: 20rpx;
padding: 30rpx 50rpx;
.list-item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
box-sizing: border-box;
position: relative;
border-left: solid 2rpx #cacaca;
padding-bottom: $margin*1.6;
&:last-child {
border-left: solid 2rpx #fff !important;
}
&:first-child {
color: $main-color !important;
}
.dian {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: #cacaca;
border: solid 10rpx rgba($color:#cacaca, $alpha: 0.3);
position: relative;
left: -11rpx;
}
.dian-active {
background-color: $main-color;
width: 30rpx;
height: 30rpx;
left: -16rpx;
border: solid 10rpx rgba($color: $main-color, $alpha: 0.3);
box-shadow: 0 0 20rpx 4rpx rgba($color: $main-color, $alpha: 0.5);
}
.content {
flex: 1;
margin-left: 60rpx;
// padding: 10rpx 0;
font-size: $title-size * 0.9;
color: $text-color-666;
position: relative;
top: -10rpx;
.date {
margin-top: $margin;
}
}
.content-active {
color: $main-color;
}
.pictures{
width: 100%;
image{
width: 160rpx;
height: 160rpx;
margin: 8rpx;
border-radius: 2rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,372 @@
<template>
<view class="NumberWeight">
<!-- 订单分类 -->
<view class="nav" >
<view :class="['nav-item' ,selectNavId === item.id?'nav-item-selected':'']" v-for="(item,index) in navList"
:key="index" @click="selectNav(item.id)">
{{item.name}}
{{item.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
{{item.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
{{item.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
</view>
</view>
<!-- 有订单列表 -->
<block v-if="lists.length > 0">
<!-- 订单列表 -->
<view class="order-list" v-for="(item,index) in lists" :key="index">
<MallShipmentsTemplate :item="item" />
<view class="actions">
<view class="nowPay" @click="goDetail(item.shipment_no)" >查看详情</view>
<view v-if="item.can.cancel" @click="nowCancel(index,item.shipment_no)" class="nowPay">取消订单</view>
<view v-if="item.can.sign && type==='1'" @click="nowSign(index,item.shipment_no)" class="nowPay">确认签收</view>
<view v-if="item.can.refund" @click="nowRefund(item.shipment_no)" class="nowPay">申请退货</view>
<view v-if="item.can.logistic" @click="nowLogistics(item.shipment_no)" class="nowPay">查看物流</view>
</view>
</view>
</block>
<!-- 没有订单列表 -->
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import { MallShipmentsTemplate } from '@/components/mall-shipments-template/mall-shipments-template'
import { mallShipmentsPostShop , mallShipmentsSign , mallShipmentsCancel } from '@/apis/interfaces/numberWeight'
export default {
components: {
MallShipmentsTemplate
},
data() {
return {
lists: [],
page:1,
total:0,
navList: [],
type:'',// post 快递单 空为自提单
selectNavId: 'init',
count:{},// 订单数量
};
},
onLoad(e) {
console.log(e.type)
this.type = e.type
if(e.type === 'post'){
this.navList = [
{
name: '待发货',
id: 'init'
},
{
name: '已发货',
id: 'delivered'
},
{
name: '已签收',
id: 'signed'
},
{
name: '已完成',
id: 'completed'
}
]
uni.setNavigationBarTitle({
title:'我的快递单'
})
this.selectNavId = 'init'
}else{
this.navList = [
// {
// name: '待提货',
// id: 'init'
// },
{
name: '已提货',
id: 'signed'
},
{
name: '已完成',
id: 'completed'
}
]
this.selectNavId = 'signed'
uni.setNavigationBarTitle({
title:'我的提货单'
})
}
this.getList()
},
onShow(){
console.log(uni.getStorageSync('refresh'),'getStorageSync')
if(uni.getStorageSync('refresh')){
this.reset()
}
},
onUnload() {
uni.setStorageSync('refresh',false)
},
onReachBottom() {
if(this.total>this.lists.length){
this.page = this.page + 1
this.getList()
}else{
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'error',icon:false,
duration: 3000
})
}
},
methods: {
reset(){
this.page =1
this.total = 0
this.lists = []
this.getList()
uni.setStorageSync('refresh',false)
},
// 选择订单
selectNav(id) {
if (this.selectNavId !== id) {
this.selectNavId = id
this.reset()
}
},
// 获取订单列表
getList(){
let data = {
pageSize:4,
page:this.page,
state:this.selectNavId
}
let apiUrl = ''
if(this.type === 'post'){
apiUrl = 'mall/shipments/post'
}else{
apiUrl = 'mall/shipments/shop'
}
mallShipmentsPostShop(apiUrl,data).then(res=>{
console.log(res.count)
this.count = res.count
this.lists = this.lists.concat(res.lists.data)
this.total = res.lists.page.total
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
// 取消提货单
nowCancel(index,no){
console.log(index,no)
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
success: (res) =>{
if (res.confirm) {
mallShipmentsCancel(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.lists.splice(index,1)
this.total = this.total - 1
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 签收提货单
nowSign(index,no){
console.log(index,no)
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认已经收到商品了呀',
success: (res) =>{
if (res.confirm) {
console.log(no)
mallShipmentsSign(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.lists.splice(index,1)
this.total = this.total - 1
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 申请退货
nowRefund(no){
this.$Router.push({
name: 'MallShipmentsRefund',
params:{
no:no
}
})
},
// 查看物流
nowLogistics(no){
this.$Router.push({
name: 'Orderlogistics',
params:{
no:no
}
})
},
// 查看详情
goDetail(no){
this.$Router.push({
name: 'MallShipmentsInfo',
params:{
no:no
}
})
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.NumberWeight {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
// 订单nav
.nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
font-size: $title-size*0.95;
padding: 0 30rpx;
background-color: #fff;
color: #666;
border-top: solid 20rpx #f7f7f7;
position: sticky;
top: 0rpx;
z-index: 10000;
.nav-item {
border-bottom: solid 4rpx #fff;
padding: 30rpx 10rpx;
}
.nav-item-selected {
border-bottom: solid 4rpx $main-color;
color: $main-color;
}
}
// 订单列表
.order-list {
background-color: #fff;
border-radius: 20rpx;
min-height: 300rpx;
margin: 30rpx 20rpx 0 20rpx;
padding:30rpx 30rpx 20rpx 30rpx ;
// border-top: solid 4rpx #cacaca;
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 28rpx;
color: #fff;
border-top: solid 1rpx #EFF4F2;
.nowPay {
padding: 4rpx 20rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
// background-color: $main-color;
color: #999;
border:solid 1rpx #cacaca;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,670 @@
<template>
<view class="OrderInfo">
<!-- 订单状态 -->
<view class="order-status">
<view class="info">
{{info.state_text}}
<span>您的快递正在坐着火箭朝您飞来</span>
</view>
<image src="/static/images/fire.png" mode="widthFix"></image>
</view>
<!-- 收货人 -->
<view class="acceptInfo" v-if="type === '1'" >
<block >
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
<view class="address">
<u-icon name="map" color="red"></u-icon>
<span>{{address.full_address}}</span>
</view>
</block>
</view>
<view class="goods-info1">
<view class="top" >
<view class="company">
<view class="company-logo">
<image :src="info.shop.cover" mode="aspectFill" />
<view class="name ellipsis">{{info.shop.name}}</view>
</view>
<view class="flexrow">
<view class="no ellipsis">发货单号 {{info.shipment_no}}</view>
</view>
</view>
</view>
<view class="goods-info">
<image class="goods-img" :src="info.goods_sku.cover" mode="aspectFill" />
<view class="goods">
<view class="name">
<view class="name1 ellipsis-2">{{info.goods_sku.goods_name}}</view>
<!-- <span>16.80</span> -->
</view>
<view class="sku">数权个数 <span>x {{info.qty}}</span> </view>
</view>
</view>
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+info.goods_sku.goods_id'>
<view class="total-btn">再次购买</view>
</navigator>
<view class="goods-type">创建提货单时间 <span>{{info.created_at}}</span></view>
<view class="goods-type" v-if="type === '1'">运费 <span>免邮</span></view>
<view class="goods-type">提货数量 <span><u-number-box v-model="info.qty" :disabled="true"></u-number-box></span></view>
<view class="goods-type">提货方式
<u-radio-group v-model="type">
<u-radio
v-for="(item, index) in list" :key="index"
:name="item.id"
:disabled="type !== item.id"
>
{{item.name}}
</u-radio>
</u-radio-group>
</view>
<!-- <view class="goods-type" v-if="type === '2'">提货码
<span @click='takeCode'>查看提货码</span>
</view> -->
<view class="goods-type-1" v-if="type === '2'">
提货门店
<view class="goods-type-address">
<view class="list-top1">
<image :src="info.store.cover.showpath" @click="map(info.store)" mode="aspectFill" class="list-top1-img" />
<view class="shop-info shop-info1">
<view class="title ellipsis">{{info.store.name}}</view>
<view class="des" style="padding-top: 16rpx;">营业时间{{info.store.start_time}}</view>
<view class="des" style="padding-top: 4rpx;" @click="call(info.store.mobile)">联系电话{{info.store.mobile}}</view>
<view class="des" style="padding-top: 4rpx;" @click="map(info.store)">门店地址{{info.store.address}}</view>
</view>
</view>
</view>
</view>
</view>
<!-- 订单 -->
<view class="actions">
<view v-if="info.can.cancel" @click="nowCancel(shipment_no)" class="nowPay">取消订单</view>
<view v-if="info.can.sign" @click="nowSign(shipment_no)" class="nowPay">确认签收</view>
<view v-if="info.can.refund" @click="nowRefund(shipment_no)" class="nowPay">申请退货</view>
<view v-if="info.can.logistic" @click="nowLogistics(shipment_no)" class="nowPay">查看物流</view>
</view>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import { mallShipmentsInfo,mallShipmentsCancel,mallShipmentsSign } from '@/apis/interfaces/numberWeight'
export default {
name: 'OrderInfo',
data() {
return {
info:{},
list: [
{ name: '快递', disabled: true , id:'1'},
{ name: '自提', disabled: false , id:'2'}
],
address:{},
type: '1', //提货类型2 自提 1 邮寄
showStoreList: false, // 默认false不显示优惠券弹窗列表
store_id: '', // 默认没有选择任何一个优惠券
store_Name:'',// 门店名称
qty :1,
shipment_no:'', // 提货单no
};
},
onLoad(e) {
console.log(e)
this.shipment_no = e.no
this.getInfo(e.no)
console.log(this.shipment_no)
// this.getInfo('2021081817410747800300000004')
},
onShow() {
if(uni.getStorageSync('refresh')){
this.getInfo(this.shipment_no)
}
},
methods: {
getInfo(shipment_no){
mallShipmentsInfo(shipment_no).then(res=>{
this.info = res
this.address = res.express
this.type = res.type+''
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
// 取消提货单
nowCancel(no){
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
success: (res) =>{
if (res.confirm) {
mallShipmentsCancel(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.getInfo(no)
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 签收提货单
nowSign(no){
console.log(no)
uni.showModal({
title: '哎呦,提醒你',
content: '是否确认已经收到商品了呀',
success: (res) =>{
if (res.confirm) {
console.log(no)
mallShipmentsSign(no).then(res=>{
console.log(res)
this.$refs.uToast.show({
title:res,
type: 'error',icon:false,
duration: 3000
})
this.getInfo(no)
uni.setStorageSync('refresh',true)
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title:'放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
},
// 查看提货二维码 弹窗
takeCode(){
console.log(this.info.code)
let url = this.info.code,
urls = [this.info.code]
uni.previewImage({
current:url,
urls:urls
})
},
// 申请退货
nowRefund(no){
this.$Router.push({
name: 'MallShipmentsRefund',
params:{
no:no
}
})
},
call(e){
uni.makePhoneCall({
phoneNumber:e
})
},
map(info){
console.log(info.latitude,info.longitude)
uni.openLocation({
latitude: Number(info.latitude),
longitude: Number(info.longitude),
success: function () {
console.log('success');
}
});
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.OrderInfo {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
padding-bottom: 80rpx;
.order-status {
width: 100%;
height: 300rpx;
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
color: #Fff;
font-size: 36rpx;
padding: 30rpx 50rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.info {
font-size: 36rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
span {
font-size: 28rpx;
padding-top: 30rpx;
}
}
image {
width: 200rpx;
}
}
.acceptInfo {
margin: 0 30rpx;
background-color: #fff;
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
border-radius: 20rpx;
padding: 30rpx;
position: relative;
top: -30rpx;
.name {
font-size: 36rpx;
font-weight: 600;
span {
padding-left: 20rpx;
font-size: 30rpx;
}
}
.address {
padding-top: 20rpx;
font-size: 28rpx;
span {
margin-left: 10rpx;
}
}
}
.goods-info1 {
padding: 20rpx 40rpx;
background-color: #fff;
.goods-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
}
.goods-type-1{
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
}
.goods-type-address{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
u-icon{
padding-left: 20rpx;
}
}
// 顶部信息
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #EFF4F2;
.company-logo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.name {
width: 600rpx;
font-size: 30rpx;
color: #484848;
font-weight: bold;
}
}
.no {
margin-top: 16rpx;
font-size: $title-size*0.8;
color: #999;
// width: 500rpx;
}
.status {
color: #999;
font-size: $title-size;
}
}
// 商品信息
.goods-info {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 40rpx;
.goods-img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.goods {
flex: 1;
margin-left: 20rpx;
.name {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
// font-weight: bold;
.name1 {
width: 500rpx;
}
span {
font-size: 34rpx;
font-weight: normal;
}
}
.sku {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
}
}
// 合计信息
.total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
font-size: 26rpx;
color: $main-color;
flex: 1;
text-align: right;
margin-top: 20rpx;
padding-bottom: 30rpx;
}
.total-btn {
border: solid 1rpx $main-color;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
background-color: #fff;
flex: 1;
font-size: 28rpx;
padding: 20rpx 50rpx 30rpx 50rpx;
color: #fff;
.nowPay {
padding: 4rpx 20rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
// background-color: $main-color;
color: #999;
border:solid 1rpx #cacaca;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
.flexrow{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
.copy{
color: $main-color;
font-size: $title-size*0.8;
font-weight: 400;
padding: 0 30rpx;
}
}
.no-address{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
// 优惠券弹窗
.scrollView {
// padding: 40rpx;
box-sizing: border-box;
position: relative;
// 标题
.coupon-title {
padding: 40rpx;
font-weight: bold;
font-size: 40rpx;
border-bottom: solid 1rpx #f7f7f7;
}
// 优惠券样式
.coupon-list-item {
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
width: 100%;
.coupon-list-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba($color: #000, $alpha: 0);
z-index: 10001;
}
}
}
.list-top1{
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: $title-size*0.94;
width: 100%;
margin-left: 0 !important;
margin-top: 30rpx;
.shop-info{
margin-left: 20rpx;
}
.list-top1-img{
width:170rpx;
height: 170rpx;
border-radius: 10rpx;
}
.des{
font-size: 28rpx;
}
.title{
font-size: 32rpx;
}
}
.list-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
font-size: $title-size*0.94;
border-bottom: solid 1rpx #f7f7f7;
width: 600rpx;
margin-left: 30rpx;
.list-top-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.shop-info{
flex: 1;
}
.title {
width: 380rpx;
font-size: $title-size*1;
font-weight: 400;
}
.urate {
padding: 10rpx 0;
}
.des {
// padding-top: $padding*0.8;
font-size: $title-size * 0.8;
color: #999;
span {
color: #666;
padding: 0 10rpx;
}
}
.list-banner {
width: 120rpx;
margin-right: $margin*1.5;
height: 120rpx;
border-radius: 4rpx;
}
}
.list-top-right {
border: solid 1rpx $main-color;
color: $main-color;
display: inline-block;
padding: 8rpx 16rpx;
font-size: $title-size *0.8;
border-radius: 4rpx;
}
}
</style>

View File

@@ -0,0 +1,335 @@
<template>
<view class="MallShipmentRefund">
<view class="mes-des">
因您信誉良好 尊享退货包运费·7天无理由退货
</view>
<!-- 申请类型 -->
<view class="list">
<view class="list-left">申请类型</view>
<view class="list-right">申请退货</view>
</view>
<!-- 退货原因 -->
<view class="list">
<view class="list-left">退货原因</view>
<u-select v-model="show" :list="list" mode='single-column' @confirm="confirm"></u-select>
<view class="list-right" @click="show = true">{{title?title:'请选择退货'}}
<u-icon name="arrow-right" color="#cacaca" size="26" />
</view>
</view>
<!-- 退货图片 -->
<view class="list">
<view class="list-left">退货图片</view>
<view class="list-right-img">
<view class="upImg" v-for="(item,index) in pictures.showpath">
<image @click="priviewImg(index)" mode="aspectFill" :src="item" />
<u-icon name="close" @click='closeImg(index)' />
</view>
<view class="addImg" @click="updImgs">
<u-icon name="plus" label='上传图片' label-pos='bottom' size='50' margin-bottom='10' color='#606266'
label-size='26' />
</view>
</view>
</view>
<!-- 申请原因 -->
<view class="list1">
<view class="list-left">备注原因</view>
<u-input class="list-right" v-model="remark" maxlength='300' placeholder='请输入您的退货原因' type="textarea"
height='230' :border="true" :clearable='false' />
<view class="">
{{remark.length+'/'+300}}
</view>
</view>
<!-- 订单 -->
<view class="actions">
<view class="nowPay" @click="sure">确认退货</view>
</view>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
mallShipmentsRefundInfo,
mallShipmentsRefund
} from '@/apis/interfaces/numberWeight'
import {
uploads
} from '@/apis/interfaces/uploading'
export default {
name: 'MallShipmentRefund',
data() {
return {
remark: '',
shipment_no: '', // 提货单no
title: '',
list: [],
show: false,
pictures: {
path: [],
showpath: []
}, // 退货单图片
};
},
onLoad(e) {
this.shipment_no = e.no
this.getInfo(e.no)
},
methods: {
// 预览上传图片
priviewImg(index) {
console.log(index, this.pictures.showpath)
uni.previewImage({
current: index,
urls: this.pictures.showpath
})
},
// 上传图片
updImgs(type) {
uni.chooseImage({
success: res => {
console.log(res)
let path = res.tempFiles.map((val, index) => {
return {
name: 'uploads' + index,
uri: val.path
}
})
uploads(path).then(pathRes => {
// console.log(pathRes)
this.pictures = {
path: [...this.pictures.path, ...pathRes.path],
showpath: [...this.pictures.showpath, ...pathRes.url]
}
console.log(this.pictures)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
})
},
// 删除图片
closeImg(index) {
console.log(index)
this.pictures.path.splice(index, 1)
this.pictures.showpath.splice(index, 1)
console.log(this.pictures);
},
// 获取退货的基本信息
getInfo(shipment_no) {
mallShipmentsRefundInfo(shipment_no).then(res => {
let list = res.title
let lists = []
list.map(item => {
let items = {
label: item
}
lists.push(items)
})
console.log(lists)
this.list = lists
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
confirm(e) {
this.title = e[0].label
},
sure() {
let data = {
title: this.title,
shipment_no: this.shipment_no,
remark: this.remark,
pictures: JSON.stringify(this.pictures.path)
}
if (data.title === '') {
this.$refs.uToast.show({
title: '请选择退货原因',
type: 'error',icon:false,
duration: 3000
})
return;
}
if (data.remark === '') {
this.$refs.uToast.show({
title: '请填写备注信息',
type: 'error',icon:false,
duration: 3000
})
return;
}
uni.showModal({
title: '哎呦,提醒你',
content: '您是否确认申请退货',
success: (res) => {
if (res.confirm) {
mallShipmentsRefund(data).then(res => {
console.log(res)
this.$refs.uToast.show({
title: res,
type: 'error',icon:false,
duration: 3000
})
uni.setStorageSync('refresh', true)
setTimeout(res => {
uni.navigateBack()
}, 2000)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
} else if (res.cancel) {
this.$refs.uToast.show({
title: '放弃了~',
type: 'error',icon:false,
duration: 3000
})
}
}
});
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
background-color: #f7f7f7;
}
//
.mes-des {
background-color: rgba($color: #00aaff, $alpha: .2);
color: #5555ff;
text-shadow: 0 0 6rpx rgba($color: #000000, $alpha:.1);
padding: 32rpx;
text-align: center;
}
// 确认退货
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 28rpx;
padding: 30rpx;
color: #fff;
.nowPay {
padding: 20rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
width: 600rpx;
font-size: 32rpx;
background-color: $main-color;
text-align: center;
}
}
.list1 {
font-size: 30rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
width: 100%;
box-sizing: border-box;
padding: 40rpx;
border-bottom: solid 1rpx #f7f7f7;
u-input {
width: 100%;
margin-top: 30rpx;
}
}
.list {
font-size: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
width: 100%;
box-sizing: border-box;
padding: 40rpx;
border-bottom: solid 1rpx #f7f7f7;
.list-right {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
flex: 1;
margin-left: 50rpx;
font-size: 30rpx;
}
.list-right-img {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
box-sizing: border-box;
flex: 1;
margin-left: 50rpx;
font-size: 30rpx;
.upImg {
width: 159rpx;
height: 159rpx;
margin: 4rpx;
position: relative;
image {
width: 100%;
height: 100%;
}
u-icon {
position: absolute;
top: 0;
right: 0;
z-index: 1000;
background-color: red;
padding: 20rpx;
}
}
.addImg {
width: 159rpx;
height: 159rpx;
background-color: #f7f7f7;
display: flex;
justify-content: center;
}
}
}
</style>

View File

@@ -0,0 +1,186 @@
<template>
<view class="NumberWeight">
<!-- 有订单列表 -->
<view class="" v-if="lists.length > 0">
<!-- 订单列表 -->
<view class="order-list" v-for="(item,index) in lists" :key="index">
<NumberWeightTemplate :item="item" />
<view class="actions">
<view @click="nowTake(item.symbol)" class="nowPay">去提货</view>
</view>
</view>
</view>
<!-- 没有订单列表 -->
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import NumberWeightTemplate from '@/components/number-weight-template/number-weight-template'
import { mallWarrants } from '@/apis/interfaces/numberWeight'
export default {
components: {
NumberWeightTemplate
},
data() {
return {
lists: [],
page:1,
total:0
};
},
onLoad() {
this.getList()
},
onShow(){
if(uni.getStorageSync('refresh')){
this.page =1
this.total = 0
this.lists = []
this.getList()
}
},
onUnload() {
uni.setStorageSync('refresh',false)
},
onReachBottom() {
if(this.total>this.lists.length){
this.page = this.page + 1
this.getList()
}else{
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'error',icon:false,
duration: 3000
})
}
},
methods: {
getList(){
let data = {
perPage:10,
page:this.page
}
mallWarrants(data).then(res=>{
this.lists = this.lists.concat(res.data)
this.total = res.total
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
},
// 立即提货
nowTake(symbol){
uni.navigateTo({
url:'./numberWeightInfo?symbol='+symbol
})
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.NumberWeight {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
// 订单nav
.nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: $title-size*0.95;
padding: 0 30rpx;
background-color: #fff;
color: #666;
border-top: solid 20rpx #f7f7f7;
.nav-item {
border-bottom: solid 4rpx #fff;
padding: 30rpx 10rpx;
}
.nav-item-selected {
border-bottom: solid 4rpx $main-color;
color: $main-color;
}
}
// 订单列表
.order-list {
background-color: #fff;
border-radius: 20rpx;
min-height: 300rpx;
margin: 30rpx 20rpx 0 20rpx;
padding:30rpx 30rpx 20rpx 30rpx ;
// border-top: solid 4rpx #cacaca;
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 28rpx;
color: #fff;
border-top: solid 1rpx #EFF4F2;
.nowPay {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: $main-color;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,788 @@
<template>
<view class="OrderInfo">
<!-- 订单状态 -->
<view class="order-status">
<view class="info">
待提货
<span>确认提货后快递会坐着火箭朝您飞来</span>
</view>
<image src="/static/imgs/fire.png" mode="widthFix" />
</view>
<!-- 收货人 -->
<view class="acceptInfo" v-if="type === '1'">
<navigator v-if='!!address.name' url="/pages/property/address/list?type=1" hover-class="none">
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
<view class="address">
<u-icon name="map" color="red"></u-icon>
<span>{{address.full_address}}</span>
</view>
</navigator>
<navigator v-else class="no-address selectNew" url="/pages/property/address/list?type=1" hover-class="none">
<u-icon name="map-fill" color="#208bff" size="40" label='选择收货地址' />
</navigator>
</view>
<view class="goods-info1">
<view class="top">
<view class="company">
<view class="company-logo">
<image :src="shop.cover" mode="aspectFill" />
<view class="name ellipsis">{{shop.name}}</view>
</view>
<view class="flexrow">
<view class="no ellipsis">区块链地址 {{account.addr}}</view> <span class="copy"
@click='copy(account.addr)'>复制</span>
</view>
</view>
</view>
<view class="goods-info">
<image class="goods-img" :src="goods.cover" mode="aspectFill" />
<view class="goods">
<view class="name">
<view class="name1 ellipsis-2">{{goods.goods_name}}</view>
<!-- <span>16.80</span> -->
</view>
<view class="sku">可提个数 <span>x {{account.balance}}</span> </view>
</view>
</view>
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+goods.goods_id'>
<view class="total-btn">再次购买</view>
</navigator>
<view class="goods-type" v-if="type === '1'">运费 <span>免邮</span></view>
<view class="goods-type">提货数量 <span>
<u-number-box v-model="qty" :min='1' :max='account.balance'></u-number-box>
</span></view>
<view class="goods-type">提货方式
<u-radio-group v-model="type" @change="radioGroupChange">
<u-radio v-for="(item, index) in list" :key="index" :name="item.id" :disabled="type !== item.id">
{{item.name}}
</u-radio>
</u-radio-group>
</view>
<!-- 不显示了就 -->
<view class="goods-type" v-if="type === '100'">
提货门店
<view class="goods-type-address" @click="showStoreList = true">
{{store_Name!==''?store_Name:'选择门店'}}
<u-icon name="arrow-right" color="#999" size="20" />
</view>
</view>
</view>
<!-- 订单 -->
<view class="actions">
<view class="nowPay" @click="nowTake">{{type === '2'?'生成提货二维码':'确认提货'}}</view>
</view>
<!-- 优惠券弹窗 -->
<u-popup v-model="showStoreList" mode="bottom" border-radius="14">
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView">
<view class="coupon-title">可提货门店</view>
<view class="coupon-list-item" v-for="(item,index) in stores" :key="index" v-if="stores.length>0">
<u-icon v-if="store_id!== item.store_id" name="checkmark-circle" color="#cacaca" size="50" />
<u-icon v-else name="checkmark-circle-fill" color="#2979ff" size="50" />
<!-- 遮挡层用户控制点击事件 -->
<view class="list-top">
<view class="list-top-left">
<image :src="item.cover" mode="aspectFill" class="list-banner"></image>
<view class="shop-info">
<view class="title ellipsis">{{item.name}}</view>
<view class="des" style="padding-top: 12rpx;">营业时间{{item.opening_time}}</view>
<view class="des" style="padding-top: 4rpx;">门店地址{{item.address}}</view>
</view>
</view>
</view>
<view class="coupon-list-item" @click="selectStore(item)"></view>
</view>
<!-- 没有优惠券列表 -->
<no-list v-if="stores.length === 0" name='no-shop' txt="没有任何门店哦~" />
</scroll-view>
</u-popup>
<!-- 二维码展示动画效果 -->
<view class="showCode " v-if="showCode">
<view class="showCodeBg" @click="showCode = false"></view>
<view :class="['showCodeContent', showCode?'showCodeContentSelect':'showCodeContentSelectNo']">
<view class="showCodeTitle">提货二维码</view>
<image :src="showCodeImg" mode="widthFix"></image>
<view class="showCodeDes">此码请小心保管,丢失或被用不退不换</view>
</view>
</view>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
mallWarrantsList,
mallWarrantsSure,
mallWarrantsQrcode
} from '@/apis/interfaces/numberWeight'
export default {
name: 'OrderInfo',
data() {
return {
symbol: '',
account: {},
address: {},
addresses: [],
goods: {},
shop: {},
stores: [],
list: [{
name: '快递',
disabled: false,
id: '1'
},
{
name: '自提',
disabled: false,
id: '2'
}
],
type: '', //提货类型2 自提 1 邮寄
showStoreList: false, // 默认false不显示优惠券弹窗列表
store_id: '', // 默认没有选择任何一个优惠券
store_Name: '', // 门店名称
qty: 1,
showCode:false,
showCodeImg:''
};
},
onLoad(e) {
this.symbol = e.symbol
this.getInfo(e.symbol)
// this.getInfo('G22S20')
},
methods: {
getInfo(symbol) {
mallWarrantsList(symbol).then(res => {
this.account = res.account
this.address = res.address
this.addresses = res.addresses
this.goods = res.goods
this.stores = res.stores
this.shop = res.shop
this.stores = res.stores
this.qty = res.account.balance
this.type = res.logistic_type + ''
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
setTimeout(res => {
uni.navigateBack({})
}, 2000)
})
},
// 选中任一radio时由radio-group触发
radioGroupChange(e) {
this.type = e
if (e === '2') {
this.store_id = ''
this.store_Name = ''
}
},
// 选择可用优惠券
selectStore(item) {
this.store_id = item.store_id
this.store_Name = item.name
this.showStoreList = false
},
// 确认提货
nowTake() {
let data = {
symbol: this.symbol,
type: this.type,
store_id: this.store_id || '',
qty: this.qty,
address_id: this.address.address_id || '',
}
if (data.type === '1') {
if (data.address_id === '') {
this.$refs.uToast.show({
title: '请添加收货地址',
type: 'error',icon:false,
duration: 3000
})
return;
}
data.store_id = ''
}
console.log(data)
// 快递单继续沿用之前的信息
if (data.type === '1') {
mallWarrantsSure(data).then(res => {
console.log(res)
this.$refs.uToast.show({
title: res,
type: 'error',icon:false,
duration: 3000,
})
uni.setStorageSync('refresh', true)
setTimeout(res => {
uni.navigateBack({})
}, 3000)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
}
// 提货或者服务单生成二维码
else {
mallWarrantsQrcode(data).then(res => {
console.log(res)
this.showCodeImg = res.code
// uni.setStorageSync('refresh', true)
this.showCode = true
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
})
}
},
// 复制
copy(e) {
uni.setClipboardData({
data: e,
success: () => {
}
})
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.OrderInfo {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
padding-bottom: 80rpx;
.order-status {
width: 100%;
height: 300rpx;
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
color: #Fff;
font-size: 36rpx;
padding: 30rpx 50rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.info {
font-size: 36rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
span {
font-size: 28rpx;
padding-top: 30rpx;
}
}
image {
width: 200rpx;
}
}
.acceptInfo {
margin: 0 30rpx;
background-color: #fff;
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
border-radius: 20rpx;
padding: 30rpx;
position: relative;
top: -30rpx;
.name {
font-size: 36rpx;
font-weight: 600;
span {
padding-left: 20rpx;
font-size: 30rpx;
}
}
.address {
padding-top: 20rpx;
font-size: 28rpx;
span {
margin-left: 10rpx;
}
}
}
.goods-info1 {
padding: 20rpx 40rpx;
background-color: #fff;
.goods-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
}
.goods-type-address {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
u-icon {
padding-left: 20rpx;
}
}
// 顶部信息
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #EFF4F2;
.company-logo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.name {
width: 600rpx;
font-size: 30rpx;
color: #484848;
font-weight: bold;
}
}
.no {
margin-top: 10rpx;
font-size: $title-size*0.8;
color: #999;
width: 500rpx;
}
.status {
color: #999;
font-size: $title-size;
}
}
// 商品信息
.goods-info {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 40rpx;
.goods-img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.goods {
flex: 1;
margin-left: 20rpx;
.name {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
font-size: 30rpx;
// font-weight: bold;
.name1 {
width: 500rpx;
}
span {
font-size: 34rpx;
font-weight: normal;
}
}
.sku {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
}
}
// 合计信息
.total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
font-size: 26rpx;
color: $main-color;
flex: 1;
text-align: right;
margin-top: 20rpx;
padding-bottom: 30rpx;
}
.total-btn {
border: solid 1rpx $main-color;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 28rpx;
padding: 30rpx;
color: #fff;
.nowPay {
padding: 20rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
width: 600rpx;
font-size: 32rpx;
background-color: $main-color;
text-align: center;
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
}
.flexrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
.copy {
color: $main-color;
font-size: $title-size*0.8;
font-weight: 400;
padding: 0 30rpx;
}
}
.no-address {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
// 优惠券弹窗
.scrollView {
// padding: 40rpx;
box-sizing: border-box;
position: relative;
// 标题
.coupon-title {
padding: 40rpx;
font-weight: bold;
font-size: 40rpx;
border-bottom: solid 1rpx #f7f7f7;
}
// 优惠券样式
.coupon-list-item {
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
width: 100%;
.coupon-list-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba($color: #000, $alpha: 0);
z-index: 10001;
}
}
}
.list-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
font-size: $title-size*0.94;
border-bottom: solid 1rpx #f7f7f7;
width: 600rpx;
margin-left: 30rpx;
.list-top-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.shop-info {
flex: 1;
}
.title {
width: 380rpx;
font-size: $title-size*1;
font-weight: 400;
}
.urate {
padding: 10rpx 0;
}
.des {
// padding-top: $padding*0.8;
font-size: $title-size * 0.8;
color: #999;
span {
color: #666;
padding: 0 10rpx;
}
}
.list-banner {
width: 120rpx;
margin-right: $margin*1.5;
height: 120rpx;
border-radius: 4rpx;
}
}
.list-top-right {
border: solid 1rpx $main-color;
color: $main-color;
display: inline-block;
padding: 8rpx 16rpx;
font-size: $title-size *0.8;
border-radius: 4rpx;
}
}
// 二维码展示
// 动画效果
.showCode {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
z-index: 1;
.showCodeBg {
background-color: rgba($color:#000, $alpha: 0.3);
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.showCodeContentSelect {
animation: sk-foldCubeAngle .6s linear both;
}
.showCodeContentSelectNo {
animation: sk-foldCubeAngleNo .6s linear both;
}
.showCodeContent {
width: 600rpx;
minheight: 500rpx;
background-color: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 30rpx;
position: relative;
z-index: 199;
image {
width: 60%;
}
.showCodeTitle {
font-weight: 600;
padding-bottom: 20rpx;
font-size: 36rpx;
margin-bottom: 20rpx;
}
.showCodeDes{
padding: 20rpx 0 20rpx 0;
color: gray;
font-size: 24rpx;
}
}
@keyframes sk-foldCubeAngle {
0% {
-webkit-transform: perspective(140px) rotateX(-180deg);
transform: perspective(140px) rotateX(-180deg);
opacity: 0;
}
100% {
-webkit-transform: perspective(140px) rotateX(0deg);
transform: perspective(140px) rotateX(0deg);
opacity: 1;
}
}
@keyframes sk-foldCubeAngleNo {
0% {
transform: scale(1);
opacity: 1;
}
25% {
transform: scale(0);
opacity: 0;
}
}
@keyframes turn {
0% {
-webkit-transform: rotate(0deg);
opacity: 1;
}
25% {
-webkit-transform: rotate(90deg);
opacity: .9;
}
50% {
-webkit-transform: rotate(180deg);
opacity: .8;
}
75% {
-webkit-transform: rotate(270deg);
opacity: .9;
}
100% {
-webkit-transform: rotate(360deg);
opacity: 1;
}
}
}
</style>

View File

@@ -10,6 +10,8 @@ $text-color: #333;
$text-gray: #555;
$text-gray-m: #999;
$text-price: #e93340;
$main-color: #e93340;
$main-color-light: #e93340;
// 边框颜色
$border-color: #ddd;
@@ -71,6 +73,45 @@ $padding: 30rpx;
-webkit-line-clamp: 2;
}
.ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ellipsis-2 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.ellipsis-3 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
.ellipsis-4 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
.ellipsis-5 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
}
// 修改nvtab
$mainColor: white;

BIN
static/imgs/fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB