first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
0500806b-2122-44ec-b69f-4215f7411a77

View File

@@ -0,0 +1,309 @@
<template>
<!-- 订单详情 页面 -->
<view class="content bg_F2F2F2">
<PublicTop page_title='订单详情'></PublicTop>
<!-- 占位 -->
<view class="place"></view>
<!-- 等待收货 -->
<view class="banner x-text-white margin-bottom22 banner1">
<view class="font-weight is_state">{{orderInfo.order_detail.order_status_str}}</view>
<view class="state_txt padding-zy64">收到货后将自动确认订单</view>
</view>
<view class="x-bg-white margin-bottom22 x_margin0auto w-90 my_order tip">
<view class="padding-30">
<view class="goods_info d-flex j-sb w-50 a-center">
<view class="font_28">{{orderInfo.user_address.consignee}}</view>
<view class="">{{orderInfo.user_address.tel}}</view>
</view>
<view class="goods_info d-flex j-sb a-center">
<image src="../../static/my/weizhi.png" mode="" style="height:26upx; width:26upx;"></image>
<view class="font_26 w-90">{{orderInfo.user_address.address}}</view>
</view>
</view>
</view>
<view v-if="orderInfo.order_detail.express_status > 0" class="x-bg-white margin-bottom22 x_margin0auto w-90 my_order" @click.stop="dump_express(orderInfo.order_detail.order_id,orderInfo.order_detail.express_sn,orderInfo.order_detail.express_name)">
<view class="padding-30">
<view class="goods_info d-flex j-sb a-center">
<image src="../../static/my/mycar.png" mode="" style="height:26upx; width:26upx;"></image>
<view class="flex-1 padding-zy30">
<view class="x-text-159">点击可查看物流详情</view>
<view>{{orderInfo.order_detail.shipping_time}}</view>
</view>
<image src="../../static/my/right.png" mode="" style="height:33upx; width:21upx;"></image>
</view>
</view>
</view>
<view class="x-bg-white margin-bottom22 x_margin0auto w-90 my_order padding-30">
<view class="font-weight">订单信息</view>
<view class="d-flex j-sb">
<view>订单编号</view>
<view>{{orderInfo.order_detail.order_sn}}</view>
</view>
<view class="d-flex j-sb">
<view>下单时间</view>
<view>{{orderInfo.order_detail.create_time}}</view>
</view>
<view class="d-flex j-sb">
<view>支付方式</view>
<view>{{orderInfo.order_detail.pay_type_text}}</view>
</view>
</view>
<!-- <view class="x-bg-white margin-bottom22 x_margin0auto w-90 my_order padding-30">
<view class="d-flex j-sb">
<view>开具发票</view>
<view>电子发票</view>
</view>
<view class="d-flex j-sb">
<view>明细内容-{{orderInfo.buyer_info.invoice_title}}</view>
</view>
</view> -->
<view class="x_margin0auto w-90 padding-30 x-bg-white my_order margin-bottom22">
<view class="d-flex goods_items a-center w-100" v-for="(item,index) of orderInfo.order_goods" :key='index'>
<view class="box_img">
<an-image :src="item.app_thumb?item.app_thumb:'https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg'" alt="https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg"></an-image>
<!-- <image :src="item.app_thumb?item.app_thumb:'../../static/noimg.png'" mode="" class="h-100 w-100"></image> -->
</view>
<view class="goods_txt flex-1 padding-zy30">
<view class="font-weight">{{item.name}}</view>
<view class="">{{item.manufacturer_name}}</view>
<view class="d-flex j-sb">
<view>{{item.spec_desc}}</view>
<view>{{item.retail_flag == 0 ? '零' : '整'}}</view>
<view>X {{item.goods_number}}</view>
</view>
<view class="d-flex j-sb margin-shu20">
<view class="x-text-159"> {{item.total}}</view>
<!-- <view class="customer_service text-center" @click="customer_service(index)">申请售后</view> -->
</view>
</view>
</view>
</view>
<view class="x-bg-white margin-bottom22 x_margin0auto w-90 my_order padding-30">
<view class="d-flex j-sb">
<view>商品总额</view>
<view>¥ {{orderInfo.order_detail.goods_amount}}</view>
</view>
<view class="d-flex j-sb">
<view>运费</view>
<view>¥ {{orderInfo.order_detail.shipping_fee}}</view>
</view>
<view class="d-flex j-sb">
<view>订单总价</view>
<view>¥ {{orderInfo.order_detail.total_amount}}</view>
</view>
<view class="d-flex j-sb">
<view>实付金额</view>
<view>¥ {{orderInfo.order_detail.total_amount}}</view>
</view>
</view>
<view class="x_public_box x-text-white x-bg-159 margin-shu20 shadow addBtn w-90" style="line-height: 80upx;" v-if='orderInfo.order_detail.order_status==1' @click="dump_pay()">去支付</view>
<!-- <view v-if="orderInfo.order_detail.order_status==1" class="d-flex bottom-0 right-0 w-100">
<view class="flex-1 main-bg-color text-white font-md py-2 text-center btn3"
hover-class="main-bg-hover-color" @click="add()">去支付</view>
</view> -->
</view>
</template>
<script>
import uniCombox from "../../components/uni-combox/uni-combox/uni-combox.vue"
import PublicTop from '../../components/HeaderTop/PublicTop.vue'
import order from '../../utils/models/order.js'
import anImage from '@/components/an-image/an-image'
export default {
data() {
return {
id:0,
orderInfo: {
invalid_order_goods: [],
buyer_info: {},
user_address: {},
order_goods: [],
order_detail: {},
cancel_reason: ''
}
}
},
components: {
uniCombox,
PublicTop,
anImage
},
methods: {
//申请售后
customer_service(index){
},
// 去支付
dump_pay(){
// 跳转选择支付页面
uni.navigateTo({
url:'../my/pay_type?order_id='+this.orderInfo.order_detail.order_id
})
},
// 查看物流
dump_express(id,express_sn,express_name){
uni.navigateTo({
url:'../order/express?id='+id+'&express_sn='+express_sn+'&express_name='+express_name
})
},
async getInfo() {
let data = await order.getInfo(this.id)
this.orderInfo = data.data
this.handleError(data, res => {
})
},
},
created() {
this.getInfo()
},
onLoad(option) {
this.id = option.id
this.index = option.index
}
}
</script>
<style lang="scss">
.place{
background-color: #ffffff;
height: 148upx;
}
.content {
uni-textarea{
width:100%;
}
height:100%;
overflow-y: auto;
.banner {
background-position: center;
background-size: cover;
height: 221upx;
.is_state {
padding: 50upx 0 0 64upx;
line-height: 60upx;
}
}
.banner1{
background-image: url(../../static/my/banner1.png);
}
.banner2{
background-image: url(../../static/my/banner2.png);
}
.banner3{
background-image: url(../../static/my/banner3.png);
}
.banner4{
background-image: url(../../static/my/banner4.png);
}
.banner5{
background-image: url(../../static/my/banner5.png);
}
.banner6{
background-image: url(../../static/my/banner6.png);
}
.tip{
margin-top: -60upx;
}
.my_order {
border-radius: 20upx;
position: relative;
.refund_form{
height: 80upx;
.selection-component{
border:1upx solid #C3C3C3;
overflow: hidden;
margin-left:30upx;
z-index:88;
}
.selection-show{
position: relative;
}
.selection-list{
z-index:99;
border:1upx solid #C3C3C3;
overflow: hidden;
}
}
.box_img {
height: 153.3upx;
width: 198upx;
background-color: #F2F2F2;
padding: 10upx 20upx;
margin: 0 10upx;
}
.info{
line-height: 30upx;
margin-top:20upx;
}
.select_txt{
line-height: 80upx;
width:20%;
}
.select_input{
z-index: 106;
line-height: 38px;
width:75%;
}
.remarks{
padding:20upx 0 0 30upx ;
font-size: 26upx;
}
.updata_img{
height:143.6upx;
width:150upx;
}
.is_txt{
text-align: justify;
}
.is_txt:after{
content: " ";
display: inline-block;
width: 100%;
}
.customer_service{
border:1upx solid #989898;
border-radius: 20upx;
line-height: 45upx;
color: #989898;
padding:0 20upx;
}
}
.order_list {
height: calc(100% - 238upx);
overflow-y: auto;
.order_state {
border-radius: 20upx 0 0 20upx;
height: 46upx;
width: 120upx;
background-color: #EDCA4A;
line-height: 46upx;
position: absolute;
right: 0;
}
.order_items {
border-radius: 20upx;
position: relative;
}
}
.is_submit{
line-height: 82upx;
margin:100upx auto;
}
}
</style>

View File

@@ -0,0 +1,160 @@
<template>
<!-- 查看物流 页面 -->
<view class="content bg_F2F2F2">
<PublicTop page_title='物流详情'></PublicTop>
<!-- 占位 -->
<view class="place"></view>
<view class="x_margin0auto w-90 padding-30 x-bg-white my_order margin-bottom22">
<view class="d-flex goods_items a-center w-100" v-for="(item,index) of goods_list" :key='index'>
<view class="box_img">
<an-image :src="item.app_thumb?item.app_thumb:'https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg'" alt="https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg"></an-image>
</view>
<view class="goods_txt flex-1 padding-zy30">
<view class="font-weight">{{item.name}}</view>
<view class="">{{item.manufacturer_name}}</view>
<view class="d-flex j-sb">
<view>{{item.spec_desc}}</view>
<view>{{item.retail_flag == 1?'整':'零'}}</view>
<view>X {{item.goods_number}}</view>
</view>
<view class="d-flex j-sb margin-shu20">
<view class="x-text-159"> {{item.unit_price}}</view>
</view>
</view>
</view>
</view>
<view class="x_margin0auto w-90 padding-30 x-bg-white my_order margin-bottom22">
<view class="wuliu">
<uni-steps :options=list direction="column" :active = list_index active-color='#EB5159'></uni-steps>
</view>
</view>
</view>
</template>
<script>
import uniSteps from'../../components/uni-steps/uni-steps.vue'
import PublicTop from '../../components/HeaderTop/PublicTop.vue'
import order from '../../utils/models/order.js'
import anImage from '@/components/an-image/an-image'
export default {
data() {
return {
order_info:{},
goods_list:[],
list: [],
list_index:1,
order_id:0,
exp_num:'',
exp_type:'',
type:'get_detail'
}
},
components:{
PublicTop,
uniSteps,
anImage
},
methods: {
async getExpress() {
let parames = {
order_id:this.order_id,
exp_num : this.exp_num,
exp_type : this.exp_type,
type : this.type
}
let data = await order.getExpress(parames)
this.list = data.data.express_info
this.goods_list = data.data.order_info.order_goods
this.order_info = data.data.order_info.order_detail
this.handleError(data, res => {
})
},
},
created() {
this.getExpress()
},
onLoad(option) {
this.order_id = option.id
this.exp_num = option.express_sn
this.exp_type = option.express_name
this.type = 'get_detail'
}
}
</script>
<style lang="scss">
.place{
background-color: #ffffff;
height: 148upx;
}
.content {
height:100%;
overflow-y: auto;
.my_order {
margin-top:30upx;
border-radius: 20upx;
position: relative;}
.box_img {
height: 153.3upx;
width: 198upx;
background-color: #F2F2F2;
padding: 10upx 20upx;
margin: 0 10upx;
}
.order_list {
height: calc(100% - 238upx);
overflow-y: auto;
.order_items {
border-radius: 20upx;
}
}
.list {
font-size: 26upx;
.list_items {
position: relative;
.box_img {
height: 153.3upx;
width: 198upx;
padding: 10upx 20upx;
margin: 0 10upx;
}
.goods_items {
position: relative;
.goods_count {
position: absolute;
bottom: -14upx;
right: 8upx;
}
}
.line {
height: 4upx;
background-color: #F2F2F2;
}
}
.look_logistics{
border-radius: 20upx;
width:132upx;
height:45upx;
line-height: 45upx;
text-align: center;
border:1upx solid #C3C3C3;
position: absolute;
right:22upx;
bottom:-54upx;
}
}
.img{
height:17upx;
width:32upx;
}
}
</style>

View File

@@ -0,0 +1,347 @@
<template>
<!-- 我的订单 页面 -->
<view class="bg_F2F2F2 h-100">
<PublicTop page_title='我的订单'></PublicTop>
<!-- 占位 -->
<view class="place"></view>
<view class="menu d-flex j-around x-bg-white shadow">
<view class="" v-for="(item,index) of menu" :key='index' :class="{menu_active:menu_index == index}" @click="choose_menu(index)">{{item.name}}</view>
</view>
<view class="place1"></view>
<view v-if='orderList.length<=0' align="center" class="no_list">
<image src="../../static/no/u/carno.png" mode="" class="no_list"></image>
<view class="x_textCenter margin-shu20 x_text_hui">暂无订单</view>
</view>
<view class="padding-zy30 bg_F2F2F2">
<view class="order_list x_margin0auto" v-if='orderList.length>0'>
<view class="padding-30 order_items margin-shu20 x-bg-white" v-for="(item,index) of orderList" :key='index' @click="dump_details(item.order_id,index)">
<view class="d-flex j-sb a-center">
<view class="" style="width:78%;">订单编号</view>
<!-- // 1货到付款值2线下支付值3小程序支付值4微信支付值5支付宝支付 -->
<image src="../../static/shoppingCart/weixin.png" mode="" style="height:32upx; width:32upx;" v-if='item.pay_type==4'></image>
<image src="../../static/shoppingCart/zhifubao.png" mode="" style="height:32upx; width:32upx;" v-if='item.pay_type==5'></image>
<image src="../../static/shoppingCart/huo.png" mode="" style="height:32upx; width:32upx;" v-if='item.pay_type==1'></image>
<image src="../../static/shoppingCart/gong.png" mode="" style="height:32upx; width:32upx;" v-if='item.pay_type==2'></image>
<view>{{item.order_status_str}}</view>
</view>
<view class="d-flex j-sb">
<view>{{item.order_sn}}</view>
<view class="x_text_hui">{{item.create_time}}</view>
</view>
<view class="list x-bg-white padding-sx30">
<view class="list_items">
<view class="items_li d-flex a-center" v-for="(value,key) of item.goods_list" :key="key">
<view class="d-flex goods_items a-center w-100">
<view class="box_img">
<an-image :src="value.app_thumb?value.app_thumb:'https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg'" alt="https://ydyd-develop-file.oss-cn-hangzhou.aliyuncs.com/imageerror.jpg"></an-image>
<!-- <image :src="value.app_thumb?value.app_thumb:'../../static/noimg.png'" mode="" class="h-100 w-100"></image> -->
</view>
<view class="goods_txt flex-1 padding-zy30">
<view class="font-weight">{{value.name}}</view>
<view class="x_text_hui">{{value.manufacturer_name}}</view>
<view class="">{{value.spec_desc}} &nbsp;&nbsp;&nbsp;{{value.unit}}</view>
<view class="d-flex j-sb">
<view class="x-text-159"> {{value.unit_price}}</view>
<view class="">X {{value.goods_number}}</view>
</view>
</view>
</view>
</view>
<view class="d-flex padding-zy30 j-end">
<text class="x_text_hui">{{item.total_num}},</text>
<text class="x_text_hei2828 margin-zy20 font-weight">合计:</text>
<text class="x-text-159"> {{item.total_amount}}</text>
</view>
<view class="place2"></view>
<view class="func_btn d-flex j-end">
<view v-if="item.order_status == 1" style="background-color: #FF8800; border:none;" class="x-text-white look_logistics margin-zy20" @click.stop="dump_pay(item.order_id)">去支付</view>
<view v-if="item.order_status == 1" class="x_text_hui look_logistics margin-zy20" @click.stop="cancel_pay(item)">取消订单</view>
<view v-if="item.order_status == 4" class="x_text_hui look_logistics margin-zy20">订单已取消</view>
<view v-if="item.order_status >= 5" class="x_text_hui look_logistics margin-zy20" @click.stop="dump_express(item.order_id,item.express_sn,item.express_name)">查看物流</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="loading-text">{{loadingText}}</view> -->
</view>
</template>
<script>
//
import PublicTop from '../../components/HeaderTop/PublicTop.vue'
import order from '../../utils/models/order.js'
import X_goods from '../../utils/models/goods.js'
import anImage from '@/components/an-image/an-image'
export default {
data() {
return {
page:1,
isScroll:true,
orderList:[
],
loadingText:"",
status:'',
demoStatus:1,
menu_index: 0, // 菜单当前下标
// 1 待付款 2代发货 6待收货 3已完成
menu: [{
name: '全部'
}, {
name: '待付款'
}, {
name: '待发货'
}, {
name: '待收货'
}, {
name: '已完成'
}]
}
},
components: {
PublicTop,
anImage
},
onLoad(option) {
// 1 待付款 2代发货 6待收货 3已完成
if(option.is_index){
this.menu_index = option.is_index
if(this.menu_index==1){
this.status = 1;
}
if(this.menu_index==2){
this.status = 2;
}
if(this.menu_index==3){
this.status = 6;
}
if(this.menu_index==4){
this.status = 3;
}
}
},
//下拉刷新需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(()=>{
this.reload();
uni.stopPullDownRefresh();
}, 1000);
},
//上拉加载需要自己在page.json文件中配置"onReachBottomDistance"
onReachBottom(){
if(!this.isScroll){
this.loadingText="到底了";
return false;
}else{
this.loadingText="正在加载...";
setTimeout(() => {
this.getList();
}, 500);
}
},
methods: {
async getList() {
let parames = {
page:this.page,
order_status:this.status
}
let data = await order.getList(parames)
if(data.data.current_page == data.data.last_page){
this.isScroll = false
this.loadingText="到底了";
}
for (let i = 0; i < data.data.data.length; i++) {
this.orderList.push(data.data.data[i])
}
this.page++
this.handleError(data, res => {
})
},
// 查看物流
dump_express(id,express_sn,express_name){
uni.navigateTo({
url:'../order/express?id='+id+'&express_sn='+express_sn+'&express_name='+express_name
})
},
cancel_pay(item){
let _this = this
uni.showModal({
title: '提示',
content: '确认是否取消此订单',
success: function (res) {
if (res.confirm) {
_this.do_cancel_pay(item)
} else if (res.cancel) {
}
}
});
},
// 取消订单
async do_cancel_pay(item){
let res = await X_goods.x_cancelOrder(item.order_id)
this.orderList.splice(item,1)
this.handleError(res, res => {
})
},
// 去支付
dump_pay(id){
// 跳转选择支付页面
uni.navigateTo({
url:'../my/pay_type?order_id='+id
})
},
// 查看订单详情页
dump_details(id,index){
uni.navigateTo({
url:'../order/details?id='+id+'&index='+index
})
},
// 选择菜单
choose_menu(index) {
this.menu_index = index;
this.page = 1
this.isScroll = true
this.orderList = []
this.loadingText="正在加载...";
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
switch(index){
case 0: {
this.status = '';
break;
}
case 1: {
this.status = 1;
break;
}
case 2: {
this.status = 2;
break;
}
case 3: {
this.status = 6;
break;
}
case 4: {
this.status = 3;
break;
}
}
this.getList();
}
},
onShow() {
this.page = 1
this.isScroll = true
this.orderList = []
this.getList()
},
created(){
// this.page = 1
// this.isScroll = true
// this.orderList = []
// this.getList()
},
}
</script>
<style lang="scss">
.place{
background-color: #ffffff;
height: 148upx;
}
.place1{
background-color: #ffffff;
height: 90upx;
}
.place2{
background-color: #ffffff;
height: 40upx;
}
.loading-text{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 60upx;
color: #979797;
font-size: 24upx;
}
.menu {
z-index: 1;
font-size: 30upx;
line-height: 90upx;
width: 100%;
position:fixed;
.menu_active {
border-bottom: 4upx solid #6E67FF;
color: #6E67FF;
font-weight: bold;
}
}
.no_list{
height:199upx;
width:395upx;
}
.no_list{
text-align:center;
margin:23upx auto;
}
.order_list {
height: calc(100% - 238upx);
overflow-y: auto;
.order_items {
border-radius: 20upx;
}
}
.list {
font-size: 26upx;
.list_items {
.box_img {
height: 153.3upx;
width: 198upx;
background-color: #F2F2F2;
padding: 10upx 20upx;
margin: 0 10upx;
}
.goods_items {
.goods_count {
bottom: -14upx;
right: 8upx;
}
}
.line {
height: 4upx;
background-color: #F2F2F2;
}
}
.look_logistics{
border-radius: 10upx;
// width:132upx;
height:52upx;
line-height: 52upx;
width:160upx;
// line-height: 45upx;
text-align: center;
border:1upx solid #C3C3C3;
}
}
</style>