[商城整个模块,及个人中心相应的模块调整]
This commit is contained in:
302
pages/user/address/create.vue
Normal file
302
pages/user/address/create.vue
Normal file
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<view class="address-create" v-if="isloaded">
|
||||
<view class="list-item">
|
||||
<view class="item">收货人 <input placeholder-class="placeholder-style" maxlength="10" v-model="name"
|
||||
placeholder="请输入收货人姓名" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item">联系电话 <input placeholder-class="placeholder-style" v-model="mobile" type="number" maxlength="11"
|
||||
placeholder="请输入收货人手机号码" /></view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item">所在区域
|
||||
<span @click="btnClick()">{{addressTxt || '请选择省市区县,乡镇等'}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item">详细地址 <textarea placeholder-class="placeholder-style" v-model="address" auto-height
|
||||
placeholder="请完善详细街道,楼牌号等" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item moren">
|
||||
<view class="item">
|
||||
<view class="uni-list-cell-db">设置默认地址</view>
|
||||
<switch @change="switchChange" :checked="is_default" color='#8b64fd' style="transform:scale(0.9)" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="besure" @click="besure">保存</view>
|
||||
<selectAddress ref='selectAddress' :addressIdList='addressIdList' @selectAddress="successSelectAddress" />
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import selectAddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue'
|
||||
import cityData from '@/static/yixuan-selectAddress/city.json'
|
||||
import {
|
||||
addAddresses,
|
||||
getAddresses,
|
||||
editAddresses
|
||||
} from '@/apis/interfaces/address'
|
||||
export default {
|
||||
components: {
|
||||
selectAddress
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '', //姓名
|
||||
mobile: '', //电话
|
||||
address: '', //详细地址
|
||||
is_default: false, //默认 1=默认
|
||||
addressTxt: '', // 已选择的地址显示 (页面显示)
|
||||
addressIdList: [], // 向子组件传递参数数组[3,36,37] 即显示默认值【province_id,province_id,district_id】
|
||||
addressId: '',
|
||||
isloaded: false
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
if (!!e.id) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑地址'
|
||||
})
|
||||
this.addressId = e.id
|
||||
this.getInfo(e.id)
|
||||
} else {
|
||||
this.isloaded = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 根据地址id获取地址的详细信息
|
||||
getInfo(id) {
|
||||
getAddresses(id).then(res => {
|
||||
const array = [res.province.region_id, res.city.region_id, res.district.region_id]
|
||||
this.addressIdList = array
|
||||
this.name = res.name
|
||||
this.mobile = res.mobile
|
||||
this.address = res.address
|
||||
this.addressTxt = res.province.name + ' ' + res.city.name + ' ' + res.district.name
|
||||
this.is_default = res.default
|
||||
this.isloaded = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 是否勾选默认
|
||||
switchChange(e) {
|
||||
this.is_default = e.target.value
|
||||
},
|
||||
// 点击省市区选择
|
||||
btnClick() {
|
||||
this.$refs.selectAddress.show()
|
||||
},
|
||||
besure() {
|
||||
let params = {
|
||||
name: this.name,
|
||||
mobile: this.mobile,
|
||||
address: this.address,
|
||||
is_default: this.is_default ? 1 : 0,
|
||||
province_id: this.addressIdList[0],
|
||||
city_id: this.addressIdList[1],
|
||||
district_id: this.addressIdList[2]
|
||||
}
|
||||
console.log(params,'params。。。')
|
||||
if (params.name.trim() === '') {
|
||||
uni.showToast({
|
||||
title: '请重新核对姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (params.mobile.trim() === '' || params.mobile.trim().length !== 11) {
|
||||
uni.showToast({
|
||||
title: '请重新核对手机号码',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (this.addressIdList[0] === undefined || this.addressIdList[1] === undefined || this.addressIdList[
|
||||
2] === undefined) {
|
||||
uni.showToast({
|
||||
title: '请完善省市区信息',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (params.address.trim() === '') {
|
||||
uni.showToast({
|
||||
title: '请完善详细的收货地址',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
if (this.addressId) {
|
||||
editAddresses(this.addressId, params).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
uni.setStorageSync('refresh',true)
|
||||
uni.navigateBack({})
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else {
|
||||
addAddresses(params).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
uni.navigateBack({})
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// 选择成功回调
|
||||
successSelectAddress(address) {
|
||||
if (address[0].id) {
|
||||
this.addressIdList = [address[0].id, address[1].id, address[2].id]
|
||||
this.addressTxt = address[0].name + ' ' + address[1].name + ' ' + address[2].name
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.Create-addr {
|
||||
line-height: 100vh;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.list-item {
|
||||
padding: 0 $padding*1.5;
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: $padding 0;
|
||||
border-bottom: solid #f8f8f8 1rpx;
|
||||
font-size: $title-size - 2;
|
||||
color: #333;
|
||||
|
||||
input,
|
||||
textarea,
|
||||
span,
|
||||
.picker {
|
||||
color: #353535;
|
||||
font-size: $title-size - 1;
|
||||
width: 74%;
|
||||
}
|
||||
|
||||
.picker {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.picker-item {
|
||||
width: 33.33%;
|
||||
border: solid 1rpx #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder-style {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.moren {
|
||||
border-top: $padding solid #f7f7f7;
|
||||
}
|
||||
|
||||
.besure {
|
||||
background-color: $text-price;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin: $margin*1.5;
|
||||
border-radius: $radius;
|
||||
padding: $padding*1.3;
|
||||
}
|
||||
|
||||
.popup {
|
||||
min-height: 500rpx;
|
||||
|
||||
.popup-top {
|
||||
position: relative;
|
||||
font-size: $title-size - 4;
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
padding: $padding*1.5 $padding*2;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
top: $padding;
|
||||
right: $padding;
|
||||
color: $text-price;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.addr-show {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: 0 $padding *3;
|
||||
font-size: $title-size;
|
||||
|
||||
.addr-show-item {
|
||||
padding: $padding*1.5 0;
|
||||
margin-right: $margin*2;
|
||||
max-width: 33.33%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.picker-item-selected {
|
||||
border-bottom: solid $text-price 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: 60vh;
|
||||
padding: $padding*2;
|
||||
box-sizing: border-box;
|
||||
|
||||
.scroll-item {
|
||||
padding: $padding*1.5 0;
|
||||
border-bottom: solid .25rpx rgba($color: #000000, $alpha: 0.02);
|
||||
color: #353535;
|
||||
font-size: $title-size;
|
||||
|
||||
.pr20 {
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
271
pages/user/address/list.vue
Normal file
271
pages/user/address/list.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<view class="Address-list" v-if="loaded">
|
||||
<!-- 收货地址列表 -->
|
||||
<view class="addr-list" v-for="(item,index) in addressLists" v-if="addressLists.length>0" @tap="select(index)"
|
||||
:key="index">
|
||||
<view class="addr-name-phone"> <span class="name">{{item.name}}</span> <span class="phone">
|
||||
{{item.mobile}}</span>
|
||||
</view>
|
||||
<view class="addr-des">{{item.full_address}}</view>
|
||||
<view class="moren-edit-del">
|
||||
<view class="moren" :style="item.default?'':'color:#cacaca'+'!important;'"
|
||||
@click.stop="moren(item.default+','+item.address_id)">
|
||||
<uni-icons class="uni-icons" type="checkbox-filled" size="20"
|
||||
:color="item.default?'#8b64fd':'#cacaca'">
|
||||
</uni-icons>
|
||||
默认
|
||||
</view>
|
||||
<view class="edit-del">
|
||||
<view class="edit" @click.stop="edit(item.address_id)">
|
||||
<uni-icons class="uni-icons" type="compose" size="16" color="#666"></uni-icons>编辑
|
||||
</view>
|
||||
<view class="del" @click.stop="del(item.address_id)" v-if="type != 'selectSite'">
|
||||
<uni-icons type="trash" size="16" color="#666"></uni-icons> 删除
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<!-- 底部新增按钮 -->
|
||||
<uni-fab horizontal="left" vertical="bottom" :pattern='pattern' @fabClick="fabClick" />
|
||||
</view>
|
||||
<!-- 没有收货地址 -->
|
||||
<no-list v-if="addressLists.length === 0" name='no-addr' txt="您还没有收货地址哦~" />
|
||||
<!-- 请求中... -->
|
||||
<!-- <view>{{loading?'请求中....':'请求结束'}}</view> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addresses,
|
||||
addAddresses,
|
||||
getAddresses,
|
||||
delAddresses,
|
||||
defaultAddresses,
|
||||
editAddresses
|
||||
} from '@/apis/interfaces/address'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addressLists: [],
|
||||
type: '', //用于分辨是否从订单页面-选择地址 有值为订单页面来源 === 1 是返回上一页时候处理上一页参数
|
||||
loaded: false, //默认页面不可渲染,请求接口后可以渲染
|
||||
pattern: {
|
||||
buttonColor: '#8b64fd'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
if (e.type !== undefined) {
|
||||
this.type = e.type
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
// this.getAddr()
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getAddr()
|
||||
},
|
||||
methods: {
|
||||
// 新增
|
||||
fabClick() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/address/create'
|
||||
})
|
||||
},
|
||||
// 修改
|
||||
edit(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/address/create?id=' + id
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
del(id) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '是否确认删除',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
delAddresses(id).then(res => {
|
||||
that.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
that.getAddr()
|
||||
}).catch(err => {
|
||||
that.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 默认
|
||||
moren(data) {
|
||||
let defaultT = data.split(',')[0]
|
||||
let id = data.split(',')[1]
|
||||
if (defaultT === 'false') {
|
||||
defaultAddresses(id).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(res => {
|
||||
this.getAddr()
|
||||
}, 500)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取列表
|
||||
getAddr() {
|
||||
this.loaded = true
|
||||
addresses().then(res => {
|
||||
this.addressLists = res
|
||||
uni.stopPullDownRefresh()
|
||||
console.log(this.type === '1', this.type)
|
||||
if (this.type == '1') {
|
||||
if (this.addressLists.length === 0) {
|
||||
let pages = getCurrentPages();
|
||||
let nowPage = pages[pages.length - 1];
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.$vm.address = '';
|
||||
} else {
|
||||
let pages = getCurrentPages();
|
||||
let nowPage = pages[pages.length - 1];
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.$vm.address = res[0];
|
||||
}
|
||||
}
|
||||
uni.setStorageSync('refresh', false)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 选择地址跳转
|
||||
select(index) {
|
||||
if (this.type == '1') {
|
||||
let pages = getCurrentPages();
|
||||
let nowPage = pages[pages.length - 1];
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.$vm.address = this.addressLists[index];
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Address-list {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
// margin-bottom: 150rpx;
|
||||
|
||||
.no-more-addr {
|
||||
font-size: $title-size*0.9;
|
||||
color: $text-price;
|
||||
|
||||
uni-icons {
|
||||
padding-right: $padding*0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// 地址列表
|
||||
.addr-list {
|
||||
box-shadow: 0 0 10rpx 0 rgba($color: #000000, $alpha: 0.1);
|
||||
padding: $padding $padding*1.5;
|
||||
background-color: #fff;
|
||||
margin-bottom: $margin;
|
||||
border-radius: $radius*0.5;
|
||||
|
||||
.name {
|
||||
color: #353535;
|
||||
font-weight: bold;
|
||||
font-size: $title-size*1.1;
|
||||
}
|
||||
|
||||
.phone {
|
||||
margin-left: $margin*2;
|
||||
}
|
||||
|
||||
.addr-des {
|
||||
padding: $padding*.9 0 $padding*1 0;
|
||||
font-size: $title-size-m;
|
||||
border-bottom: solid #f8f8f8 1rpx;
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.moren-edit-del {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding-top: $padding;
|
||||
|
||||
.moren,
|
||||
.edit-del {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.9;
|
||||
color: $text-price;
|
||||
|
||||
.uni-icons {
|
||||
padding-right: $padding*0.5;
|
||||
}
|
||||
|
||||
.edit {
|
||||
padding-right: $padding*1.5;
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.del {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 新增地址
|
||||
.besure {
|
||||
background-color: $text-price;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin: $margin*1.5;
|
||||
border-radius: $radius;
|
||||
padding: $padding*1.3;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -209,6 +209,53 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的权证 -->
|
||||
<!-- <view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">我的权证</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="$Router.push({name:'NumberWeight'})">
|
||||
<view class="item-num">{{count.warrnats}}</view>
|
||||
<view class="item-title">权证持有</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name: 'marketManag'})">
|
||||
<view class="item-num">{{count.warrnat_transfer}}</view>
|
||||
<view class="item-title">权证转让</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'ServicesOrder'})">
|
||||
<view class="item-num">{{count.shipment_fuwu_count}}</view>
|
||||
<view class="item-title">已使用</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'MallShipments'})">
|
||||
<view class="item-num">{{count.shipment_goods_count}}</view>
|
||||
<view class="item-title">已提货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 我的权证 -->
|
||||
<view class="userPartner">
|
||||
<view class="partner-title">
|
||||
我的权证
|
||||
</view>
|
||||
<view class="tool-list">
|
||||
<view class="tool-label" @click="$Router.push({name:'NumberWeight'})">
|
||||
<image class="tool-label-img" src="/static/user/userServe-00.png" mode=""></image>
|
||||
<view class="tool-label-name">权证持有</view>
|
||||
</view>
|
||||
<view class="tool-label" @click="$Router.push({name:'ServicesOrder'})">
|
||||
<image class="tool-label-img" src="/static/user/userServe-02.png" mode=""></image>
|
||||
<view class="tool-label-name">已使用</view>
|
||||
</view>
|
||||
<view class="tool-label" @click="$Router.push({name:'MallShipments'})">
|
||||
<image class="tool-label-img" src="/static/user/userServe-03.png" mode=""></image>
|
||||
<view class="tool-label-name">已提货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的服务 -->
|
||||
<view class="userPartner">
|
||||
<view class="partner-title">
|
||||
|
||||
178
pages/user/order/logistics.vue
Normal file
178
pages/user/order/logistics.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<view class="LogisticsIndex" v-if="loaded">
|
||||
<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: [],
|
||||
loaded:false,
|
||||
no: '', // 快递单号
|
||||
express:{},// 地址信息
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// this.no = this.$route.params.no
|
||||
// this.getLogistic(this.no)
|
||||
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
|
||||
this.loaded = true
|
||||
}).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: #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: #666;
|
||||
position: relative;
|
||||
top: -10rpx;
|
||||
|
||||
.date {
|
||||
margin-top: $margin;
|
||||
}
|
||||
}
|
||||
|
||||
.content-active {
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
326
pages/user/order/mallRefund.vue
Normal file
326
pages/user/order/mallRefund.vue
Normal 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>
|
||||
716
pages/user/order/mallRefundsInfo.vue
Normal file
716
pages/user/order/mallRefundsInfo.vue
Normal file
@@ -0,0 +1,716 @@
|
||||
<template>
|
||||
<view class="OrderInfo" v-if="loaded">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
{{state.text}}
|
||||
<span>{{state.remark}}</span>
|
||||
</view>
|
||||
<image src="/static/imgs/fire.png" mode="widthFix"></image>
|
||||
</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/details?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,
|
||||
state:{},
|
||||
refund_id: '', // 退货单no
|
||||
company: '',
|
||||
number: '',
|
||||
logs: [],
|
||||
loaded:false,
|
||||
showLogs: false // 默认不显示记录信息
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
// this.refund_id = this.$route.params.no
|
||||
// this.getInfo(this.refund_id)
|
||||
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
|
||||
this.state = res.state
|
||||
this.loaded = true
|
||||
}).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: #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>
|
||||
499
pages/user/order/mallShipments.vue
Normal file
499
pages/user/order/mallShipments.vue
Normal file
@@ -0,0 +1,499 @@
|
||||
<template>
|
||||
<view class="mallShipments">
|
||||
<!-- 订单分类 -->
|
||||
<view class="nav">
|
||||
<view :class="['nav-item' ,selectTypeId === item.id?'nav-item-selected':'']"
|
||||
v-for="(item,index) in typeList" :key="index" @click="selectType(item.id,index)">
|
||||
{{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>
|
||||
<!-- 快递点 自提单显示 -->
|
||||
<scroll-view class="nav1" v-if='selectTypeIndex === 0 || selectTypeIndex === 1' scroll-x="true" scroll-with-animation="true">
|
||||
<view :class="['nav-item' ,state === it.id?'nav-item-selected':'']" v-for="(it,idx) in typeList[selectTypeIndex].categrery"
|
||||
:key="idx" @click="selectNav(it.id)">
|
||||
{{it.name}}
|
||||
{{it.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
|
||||
{{it.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
{{it.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
|
||||
{{it.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!--退货单 -->
|
||||
<scroll-view class="nav1" v-else scroll-x="true" scroll-with-animation="true">
|
||||
<view :class="['nav-item' ,state === it.id?'nav-item-selected':'']" v-for="(it,idx) in typeList[selectTypeIndex].categrery"
|
||||
:key="idx" @click="selectNav(it.id)">
|
||||
{{it.name}}
|
||||
{{it.id ==='apply' && count.apply >0 ? '('+count.apply + ')':''}}
|
||||
{{it.id ==='deliver' && count.deliver >0 ?'('+count.deliver + ')':''}}
|
||||
{{it.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
{{it.id ==='signed' && count.signed >0 ?'('+count.signed + ')':''}}
|
||||
{{it.id ==='process' && count.process >0 ?'('+count.process + ')':''}}
|
||||
{{it.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 有订单列表 -->
|
||||
<block v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index" v-if='selectTypeIndex === 0 || selectTypeIndex === 1'>
|
||||
<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" @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>
|
||||
<!-- 有订单列表 -->
|
||||
<view class="" v-if="selectTypeIndex === 2">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index">
|
||||
<MallRefundsTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view @click="goDetail1(item.refund_id)" class="nowPay">查看详情</view>
|
||||
</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 MallRefundsTemplate from '@/components/mall-refunds-template/mall-refunds-template'
|
||||
import {
|
||||
mallShipmentsPostShop,
|
||||
mallShipmentsSign,
|
||||
mallShipmentsCancel
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
components: {
|
||||
MallShipmentsTemplate,MallRefundsTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page: 1,
|
||||
total: 0,
|
||||
navList: [],
|
||||
count: {}, // 订单数量
|
||||
typeList: [{
|
||||
name: '快递单',
|
||||
id: 'post',
|
||||
categrery: [{
|
||||
name: '待发货',
|
||||
id: 'init'
|
||||
},
|
||||
{
|
||||
name: '已发货',
|
||||
id: 'delivered'
|
||||
},
|
||||
{
|
||||
name: '已签收',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '自提单',
|
||||
id: 'take',
|
||||
categrery: [{
|
||||
name: '已提货',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '退货单',
|
||||
id: 'refund',
|
||||
categrery: [{
|
||||
name: '待审核',
|
||||
id: 'apply'
|
||||
}, {
|
||||
name: '待返货',
|
||||
id: 'deliver'
|
||||
}, {
|
||||
name: '待签收',
|
||||
id: 'delivered'
|
||||
}, {
|
||||
name: '已签收',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '待确认退货',
|
||||
id: 'process'
|
||||
},
|
||||
{
|
||||
name: '完成退货',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
selectTypeId: 'post',
|
||||
state: 'init',
|
||||
selectTypeIndex: 0
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
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.state !== id) {
|
||||
this.state = id
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
// 快递单post 提货单 take 退货单refund
|
||||
selectType(id,index) {
|
||||
console.log('id:' + id)
|
||||
if (this.selectTypeId !== id) {
|
||||
this.state = this.typeList[index].categrery[0].id
|
||||
this.selectTypeId = id
|
||||
this.selectTypeIndex = index
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
// 获取订单列表
|
||||
getList() {
|
||||
let data = {
|
||||
pageSize: 4,
|
||||
page: this.page,
|
||||
state: this.state
|
||||
}
|
||||
let apiUrl = ''
|
||||
if (this.selectTypeId === 'post') {
|
||||
apiUrl = 'mall/shipments/post'
|
||||
} else if(this.selectTypeId === 'take') {
|
||||
apiUrl = 'mall/shipments/shop'
|
||||
data.channel = 'app'
|
||||
} else if(this.selectTypeId === 'refund') {
|
||||
apiUrl = 'mall/refunds'
|
||||
}
|
||||
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
|
||||
// }
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/order/mallShipmentsRefund?no='+no
|
||||
})
|
||||
},
|
||||
// 查看物流
|
||||
nowLogistics(no) {
|
||||
// this.$Router.push({
|
||||
// name: 'Orderlogistics',
|
||||
// params: {
|
||||
// no: no
|
||||
// }
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/order/logistics?no='+no
|
||||
})
|
||||
},
|
||||
// 查看详情
|
||||
goDetail(no) {
|
||||
// this.$Router.push({
|
||||
// name: 'MallShipmentsInfo',
|
||||
// query:{
|
||||
// no:no
|
||||
// }
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/order/mallShipmentsInfo?no='+no
|
||||
})
|
||||
},
|
||||
// 查看退货单详情
|
||||
// 查看详情
|
||||
goDetail1(no){
|
||||
// this.$Router.push({
|
||||
// name: 'MallRefundsInfo',
|
||||
// params:{
|
||||
// no:no
|
||||
// }
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/order/mallRefundsInfo?no='+no
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mallShipments {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.nav1 {
|
||||
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:30rpx 30rpx 20rpx 30rpx;
|
||||
color: #666;
|
||||
position: sticky;
|
||||
top: 120rpx;
|
||||
z-index: 10000;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
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>
|
||||
669
pages/user/order/mallShipmentsInfo.vue
Normal file
669
pages/user/order/mallShipmentsInfo.vue
Normal file
@@ -0,0 +1,669 @@
|
||||
<template>
|
||||
<view class="OrderInfo" v-if="loaded">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
{{info.state_text}}
|
||||
<span>您的快递正在坐着火箭朝您飞来</span>
|
||||
</view>
|
||||
<image src="/static/imgs/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/details?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
|
||||
loaded:false
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shipment_no = e.no
|
||||
this.getInfo(e.no)
|
||||
},
|
||||
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+''
|
||||
this.loaded = true
|
||||
}).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>
|
||||
341
pages/user/order/mallShipmentsRefund.vue
Normal file
341
pages/user/order/mallShipmentsRefund.vue
Normal file
@@ -0,0 +1,341 @@
|
||||
<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)' class='closeImg' />
|
||||
</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 = this.$route.params.no
|
||||
// this.getInfo(this.shipment_no)
|
||||
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: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: #fff;
|
||||
}
|
||||
|
||||
//
|
||||
.mes-des {
|
||||
background-color: rgba($color: #ff0000, $alpha: .1);
|
||||
color: #ff0000;
|
||||
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-right {
|
||||
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%;
|
||||
}
|
||||
|
||||
.closeImg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.addImg {
|
||||
width: 159rpx;
|
||||
height: 159rpx;
|
||||
background-color: #f7f7f7;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
202
pages/user/order/numberWeight.vue
Normal file
202
pages/user/order/numberWeight.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<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 => {
|
||||
console.log(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
|
||||
})
|
||||
},
|
||||
// 转让权证
|
||||
navMarkets(symbol) {
|
||||
this.$Router.push({
|
||||
name: 'marketTransfer',
|
||||
params: {
|
||||
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>
|
||||
800
pages/user/order/numberWeightInfo.vue
Normal file
800
pages/user/order/numberWeightInfo.vue
Normal file
@@ -0,0 +1,800 @@
|
||||
<template>
|
||||
<view class="OrderInfo" v-if="loaded">
|
||||
<!-- 订单状态 -->
|
||||
<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/user/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/user/address/list?type=1" hover-class="none">
|
||||
<u-icon name="map-fill" color="#613091" 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/details?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:'',
|
||||
loaded:false
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.symbol = e.symbol
|
||||
this.getInfo(e.symbol)
|
||||
// this.getInfo('G22S20')
|
||||
},
|
||||
// 监听弹窗页面为false时候,重新请求当前页面
|
||||
watch: {
|
||||
showCode(newVal, oldVal) {
|
||||
if(!newVal && oldVal){
|
||||
this.getInfo(this.symbol)
|
||||
uni.setStorageSync('refresh',true)
|
||||
}
|
||||
}
|
||||
},
|
||||
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 + ''
|
||||
this.loaded = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.setStorageSync('refresh',true)
|
||||
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>
|
||||
237
pages/user/order/servicesOrder.vue
Normal file
237
pages/user/order/servicesOrder.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<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>
|
||||
</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: 'signed',
|
||||
count:{},// 订单数量
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.navList = [
|
||||
{
|
||||
name: '已使用',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
this.selectNavId = 'signed'
|
||||
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: '吼吼吼~我是有底的~',
|
||||
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 = ''
|
||||
apiUrl = 'mall/shipments/service'
|
||||
data.channel = 'app'
|
||||
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,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
goDetail(no){
|
||||
uni.navigateTo({
|
||||
url:'/pages/property/order/servicesOrderInfo?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>
|
||||
594
pages/user/order/servicesOrderInfo.vue
Normal file
594
pages/user/order/servicesOrderInfo.vue
Normal file
@@ -0,0 +1,594 @@
|
||||
<template>
|
||||
<view class="OrderInfo" v-if="loaded">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
{{info.state_text}}
|
||||
<span>您的快递正在坐着火箭朝您飞来</span>
|
||||
</view>
|
||||
<image src="/static/imgs/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/details?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> x {{info.qty}}</span></view>
|
||||
<view class="goods-type">使用方式<span>门店使用</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>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mallShipmentsInfo
|
||||
} 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,
|
||||
loaded: false,
|
||||
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 + ''
|
||||
this.loaded = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
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>
|
||||
Reference in New Issue
Block a user