464 lines
8.9 KiB
Vue
464 lines
8.9 KiB
Vue
<template>
|
|
<view class="">
|
|
<you-scroll ref="scroll" @onPullDown="onPullDown">
|
|
<view class="dashboard-container">
|
|
|
|
<view class="container-top">
|
|
<!-- <input v-model="keyword" prefix-icon="el-icon-search" placeholder="请输入内容" @input="inpuval" /> -->
|
|
<u-search placeholder="请输入订单编号,联系方式,名称" v-model="keyword" @input="inpuval" :showAction='false'
|
|
bgColor='#fff' height="30" class="usearch"></u-search>
|
|
<view class="serch" @click="serch">搜索</view>
|
|
|
|
</view>
|
|
<view class="container-content" v-if="list.length>0">
|
|
<scroll-view scroll-x="true" style="width: 565rpx;white-space: nowrap;overflow: hidden;"
|
|
@scrolltolower="loadMoreData">
|
|
<view v-for="(item,i) in list" :key="i" class="content-one" @click="kk(item)">
|
|
<view class="" @click="kk(item)">
|
|
<view :class="item.status==3?'content-one-title1':'content-one-title'">
|
|
<view class="">收货人名称:{{item.receiver_name}}</view>
|
|
<view class="" v-if="item.status==3">已取消</view>
|
|
</view>
|
|
<view class="content-one-con">
|
|
|
|
<view>联系电话:{{item.receiver_phone}}</view>
|
|
<view>商家地址:{{item.shop_address}}</view>
|
|
<view>订单编号:{{item.order_sn}}</view>
|
|
|
|
<view v-if="item.status!=3">取货时间:{{item.qh_time}}</view>
|
|
|
|
<view v-if="item.status!=3">送达时间:{{item.ps_time}}</view>
|
|
<!-- <view>订单状态:{{item.status==0?'待取货':item.status==1?'配送中':item.status==2?'已配送':'待取消'}}</view> -->
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="shop-content">
|
|
<view class="shop-content-a">
|
|
<view class="shop-content-a1">商品信息:</view>
|
|
<view class="shop-content-a2">{{ item.products.length }}件</view>
|
|
|
|
</view>
|
|
|
|
|
|
<view class="shop-list">
|
|
|
|
<view :class="item.status==3?'shop1':'shop'" v-for="(items,j) in item.products"
|
|
:key="j">
|
|
<view style="display: flex;">
|
|
<view class="shop-img">
|
|
<image :src="items.goods_pic" mode=""></image>
|
|
</view>
|
|
<view class="container-txt">
|
|
<text class=" centered-multi-line shop-txt">
|
|
{{ items.goods_name }}</text>
|
|
</view>
|
|
</view>
|
|
<view style="line-height: 34rpx;">X{{ items.product_num}}</view>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="btn" :class="item.status==3?'btns':'btn'">
|
|
<view class="btn1">
|
|
|
|
<image src="@/static/images/yan.png" mode=""></image>
|
|
</view>
|
|
<view class="btn2" @click="openCamera"> 查看详情</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<view class="bj" v-else>
|
|
|
|
<view class="bj-conter">
|
|
<view class="bja">
|
|
<image src="@/static/images/zanwu.png" mode=""></image>
|
|
</view>
|
|
<view class="bjb">
|
|
暂无订单信息
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</you-scroll>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
lists
|
|
} from '@/api/oa.js'
|
|
import youScroll from '@/components/you-scroll'
|
|
export default {
|
|
components: {
|
|
youScroll
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
|
|
list: [],
|
|
page_no: 1,
|
|
page_size: 10,
|
|
keyword: '',
|
|
erweima: '',
|
|
result: '', // 扫码结果信息
|
|
error: '', // 错误信息
|
|
// show: false,
|
|
// qrcode: false,
|
|
qrcode: true,
|
|
torchActive: false,
|
|
camera: 'auto'
|
|
}
|
|
},
|
|
mounted() {
|
|
|
|
this.initlist()
|
|
},
|
|
|
|
|
|
methods: {
|
|
onPullDown(done) { // 下拉刷新
|
|
setTimeout(() => {
|
|
this.initlist()
|
|
done(); // 完成刷新
|
|
},1000*1)
|
|
},
|
|
refresh() {
|
|
this.initlist()
|
|
|
|
},
|
|
serch() {
|
|
this.initlist()
|
|
},
|
|
inpuval(e) {
|
|
if (e.length == 0) {
|
|
this.initlist()
|
|
}
|
|
},
|
|
initlist() {
|
|
this.list = []
|
|
this.page_no = 1
|
|
this.getlist()
|
|
},
|
|
getlist() {
|
|
let data = {
|
|
page_no: this.page_no,
|
|
page_size: this.page_size,
|
|
keywords: this.keyword,
|
|
status: 2,
|
|
|
|
}
|
|
lists(
|
|
data
|
|
).then(res => {
|
|
if (res.code == 1) {
|
|
this.list = [...this.list, ...res.data]
|
|
this.page_no = this.page_no + 1
|
|
}
|
|
})
|
|
},
|
|
|
|
kk(item) {
|
|
|
|
// uni.navigateTo({
|
|
// url: '/pages/sda/detail?id=' + item.id
|
|
// })
|
|
this.$emit('onfunction', item.id,3)
|
|
|
|
},
|
|
loadMoreData() {
|
|
|
|
this.getlist()
|
|
},
|
|
// 打开相机
|
|
openCamera() {
|
|
// uni.navigateTo({
|
|
// url:'/pages/index/index1'
|
|
|
|
|
|
|
|
// uni.scanCode({
|
|
// success: (res) => {
|
|
|
|
// console.log(res.result); // 打印扫码结果
|
|
// }
|
|
// });
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.container-top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 10rpx;
|
|
background-color: #fff;
|
|
border-radius: 24rpx 24rpx;
|
|
|
|
.serch {
|
|
width: 59rpx;
|
|
height: 31rpx;
|
|
line-height: 31rpx;
|
|
border-radius: 15rpx 15rpx;
|
|
border: 1px solid #0022C7;
|
|
text-align: center;
|
|
|
|
font-size: 12rpx;
|
|
font-family: PingFang SC-Medium, PingFang SC;
|
|
font-weight: 400;
|
|
color: #0022C7;
|
|
}
|
|
}
|
|
|
|
|
|
.container-content {
|
|
margin-top: 10rpx;
|
|
}
|
|
|
|
.bj {
|
|
width: 565rpx;
|
|
display: flex;
|
|
justify-content: center;
|
|
/* 水平居中 */
|
|
align-items: center;
|
|
/* 垂直居中 */
|
|
text-align: center;
|
|
|
|
.bj-conter {}
|
|
|
|
.bja {
|
|
width: 249rpx;
|
|
height: 249rpx;
|
|
|
|
margin: 0 auto;
|
|
margin-top: 30rpx;
|
|
margin-bottom: 30rpx;
|
|
margin-right: 30rpx;
|
|
|
|
|
|
image {
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
}
|
|
}
|
|
|
|
.bjb {
|
|
font-size: 15rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #707070;
|
|
margin-right: 40rpx;
|
|
}
|
|
}
|
|
|
|
.content-one {
|
|
margin-right: 12rpx;
|
|
width: 270rpx;
|
|
padding-bottom: 50rpx;
|
|
background: #ffffff;
|
|
box-shadow: 0px 3px 6px 1px rgba(51, 51, 51, 0.2);
|
|
border-radius: 12px 12px 12px 12px;
|
|
opacity: 1;
|
|
|
|
display: inline-block;
|
|
position: relative;
|
|
}
|
|
|
|
.content-one-title {
|
|
height: 39rpx;
|
|
line-height: 39rpx;
|
|
padding-left: 15rpx;
|
|
background: #46BE61;
|
|
border-radius: 12px 12px 0px 0px;
|
|
font-size: 13rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.content-one-title1 {
|
|
height: 39rpx;
|
|
line-height: 39rpx;
|
|
padding-left: 15rpx;
|
|
background: #F84221 !important;
|
|
border-radius: 12px 12px 0px 0px;
|
|
font-size: 13rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #ffffff;
|
|
|
|
}
|
|
|
|
.content-one-con {
|
|
padding-left: 15rpx;
|
|
padding-right: 40rpx;
|
|
margin-top: 10rpx;
|
|
height: 130rpx;
|
|
font-size: 12rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #000000;
|
|
border-bottom: 1px dashed #46BE61;
|
|
|
|
view {
|
|
margin-bottom: 3rpx;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
}
|
|
}
|
|
|
|
.shop-content {
|
|
padding-left: 20px;
|
|
padding-right: 20px;
|
|
|
|
|
|
}
|
|
|
|
.shop-content-a {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 14px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.shop-content-a1 {
|
|
font-size: 13rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #000000;
|
|
}
|
|
|
|
.shop-content-a2 {
|
|
font-size: 12rpx;
|
|
font-family: PingFang SC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: #0022C7;
|
|
}
|
|
|
|
.shop-list {
|
|
height: 80rpx;
|
|
overflow: hidden;
|
|
overflow-y: auto;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.shop {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 10rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #333333;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.shop1 {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 10rpx;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #333333;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.shop-img {
|
|
width: 34rpx;
|
|
height: 34rpx;
|
|
|
|
border-radius: 6px 6px 6px 6px;
|
|
}
|
|
|
|
.shop-img image {
|
|
width: 34rpx;
|
|
height: 34rpx;
|
|
border-radius: 6px 6px 6px 6px;
|
|
}
|
|
|
|
|
|
|
|
.container-txt {
|
|
margin-left: 10rpx;
|
|
width: 130rpx;
|
|
/* 设置容器高度 */
|
|
display: flex;
|
|
justify-content: center;
|
|
/* 水平居中 */
|
|
align-items: center;
|
|
/* 垂直居中 */
|
|
}
|
|
|
|
.centered-multi-line {
|
|
text-align: left;
|
|
/* 文本水平居中 */
|
|
width: 100%;
|
|
/* 宽度占满父容器 */
|
|
}
|
|
|
|
.shop-txt {
|
|
display: inline-block;
|
|
/* 转换为行内块元素 */
|
|
white-space: normal;
|
|
/* 允许自动换行 */
|
|
word-break: break-all;
|
|
/* 单词内断行 */
|
|
}
|
|
|
|
|
|
.btns {
|
|
width: 198rpx;
|
|
height: 32rpx;
|
|
line-height: 32rpx;
|
|
background: #F84221 !important;
|
|
border-radius: 23px 23px 23px 23px;
|
|
display: flex;
|
|
position: absolute;
|
|
left: 50%;
|
|
margin-left: -99rpx;
|
|
}
|
|
|
|
.btn {
|
|
width: 198rpx;
|
|
height: 32rpx;
|
|
line-height: 32rpx;
|
|
background: #46BE61;
|
|
border-radius: 23px 23px 23px 23px;
|
|
display: flex;
|
|
position: absolute;
|
|
left: 50%;
|
|
margin-left: -99rpx;
|
|
}
|
|
|
|
.btn1 image {
|
|
width: 23rpx;
|
|
height: 23rpx;
|
|
}
|
|
|
|
.btn2 {
|
|
font-size: 12rpx;
|
|
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
font-weight: 400;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.btn1 {
|
|
width: 23rpx;
|
|
height: 23rpx;
|
|
margin-left: 60rpx;
|
|
margin-top: 2rpx;
|
|
margin-right: 10rpx;
|
|
}
|
|
</style> |