476 lines
12 KiB
Vue
476 lines
12 KiB
Vue
<style lang="scss">
|
|
.form_wrapper {
|
|
border-radius: 10rpx;
|
|
}
|
|
.form_item {
|
|
padding: 10rpx 0;
|
|
.item {
|
|
.label {
|
|
font-size: 24rpx;
|
|
}
|
|
.input {
|
|
border: 1rpx solid #eee;
|
|
border-radius: 8rpx;
|
|
padding: 4rpx;
|
|
padding-left: 8rpx;
|
|
margin-left: 4rpx;
|
|
font-size: 28rpx;
|
|
color: #999;
|
|
input {
|
|
font-size: 24rpx;
|
|
width: 160rpx;
|
|
}
|
|
}
|
|
.status {
|
|
width: 200rpx;
|
|
}
|
|
}
|
|
}
|
|
.order_sn {
|
|
font-size: 26rpx;
|
|
}
|
|
.btn_copy {
|
|
width: 80rpx;
|
|
margin-left: 4rpx;
|
|
}
|
|
.time {
|
|
font-size: 24rpx;
|
|
input {
|
|
width: 170rpx !important;
|
|
}
|
|
.u-button {
|
|
width: 100rpx;
|
|
height: 55rpx;
|
|
margin-left: 24rpx;
|
|
}
|
|
}
|
|
</style>
|
|
<template>
|
|
<view class="main">
|
|
<u-datetime-picker
|
|
:show="showDate"
|
|
v-model="value1"
|
|
mode="date"
|
|
@cancel="showDate = false"
|
|
@close="showDate = false"
|
|
@confirm="handlerConfirm"
|
|
:closeOnClickOverlay="true"
|
|
></u-datetime-picker>
|
|
<view class="form_wrapper bg-w margin-b-10 padding-20">
|
|
<view class="form_item flex flex-align-center flex-between">
|
|
<view class="item flex flex-align-center">
|
|
<text class="label">订单号:</text>
|
|
<view class="input">
|
|
<input v-model="orderNumber" type="text" placeholder="订单号">
|
|
</view>
|
|
</view>
|
|
<view class="item flex flex-align-center">
|
|
<text class="label">收款状态:</text>
|
|
<view class="input flex flex-between status" @click="showStatus = true">
|
|
<text class="font24">{{ form.status != null ? actions[form.status]['name']:'收款状态' }}</text>
|
|
<!-- <input v-model="" disabled="true" type="text" placeholder="收款状态"> -->
|
|
<u-icon
|
|
size="24rpx"
|
|
name="arrow-right"
|
|
></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="form_item flex flex-align-center flex-between time">
|
|
<view class="item flex flex-align-center flex-between">
|
|
<text class="label">确认时间:</text>
|
|
<view class="input flex flex-between" @click="handlerDate('start')">
|
|
<input disabled="true" v-model="form.startTime" type="text" placeholder="开始时间">
|
|
|
|
</view>
|
|
<text class="" style="margin: 0 6rpx;">至</text>
|
|
<view class="input flex flex-between" @click="handlerDate('end')">
|
|
<input disabled="true" type="text" v-model="form.endTime" placeholder="结束时间">
|
|
</view>
|
|
<u-button @click="handlerSearch" text="搜索" type="primary" size="mini"></u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="list">
|
|
<view class="list-item" v-for="(order, i) in list" :key="i">
|
|
<!-- <view class="user flex flex-align-center" @click="jumpTo(order.userInfo.imAccount)">
|
|
<image :src="order.userInfo.headPortrait" mode="" class="logo"></image>
|
|
<view class="flex flex-column color-b3 font30">
|
|
<text>{{order.userInfo.nickname}}</text>
|
|
<text class="color-b6">{{order.userInfo.username}}</text>
|
|
</view>
|
|
</view> -->
|
|
<!-- <view class="flex flex-center flex-column" style="margin-bottom: 30rpx;">
|
|
<text class="color-b9">收到货款</text>
|
|
<text class="font60">¥ {{order.buying}}</text>
|
|
</view> -->
|
|
|
|
<view class="cell">
|
|
<text class="label">商品名称:</text>
|
|
<text>{{ order.goodsName}}</text>
|
|
</view>
|
|
<view class="cell flex">
|
|
<text class="label">订单号:</text>
|
|
<text class="flex-grow order_sn" @click="$onCopy(order.orderNumber)">{{order.orderNumber}}</text>
|
|
<u-button class="btn_copy" @click="$onCopy(order.orderNumber)" text="复制" type="primary" size="mini"></u-button>
|
|
</view>
|
|
<view class="cell">
|
|
<text class="label">付款方式:</text>
|
|
<text>{{filterWallet(order.paymentMethod)}}</text>
|
|
</view>
|
|
<view class="flex flex-align-center flex-between">
|
|
<view class="cell">
|
|
<text class="label">收款状态:</text>
|
|
<text>{{ order.confirmationStatus === 0 ? '会员待确认' : '货款已入账' }}</text>
|
|
</view>
|
|
<view class="cell">
|
|
<text class="label">绿色积分:</text>
|
|
<text>{{order.lsjf}}</text>
|
|
|
|
</view>
|
|
</view>
|
|
<view class="cell">
|
|
<text class="label">货款金额:</text>
|
|
<text>{{order.buying === 0 ? '未知' : '¥' + order.buying}}</text>
|
|
|
|
</view>
|
|
<view class="cell">
|
|
<!-- <text>{{order.buying === 0 ? '未知' : '¥' + order.buying}}</text> -->
|
|
<text class="label">货款变更前金额:</text>
|
|
<text>{{order.confirmationStatus === 0 ? '未知' : '¥' + order.buyingBefore}}</text>
|
|
</view>
|
|
<view class="cell">
|
|
<text class="label">货款变更后金额:</text>
|
|
<text>{{order.confirmationStatus === 0 ? '未知' : '¥' + order.buyingAfter}}</text>
|
|
</view>
|
|
<view class="cell">
|
|
<text class="label">会员支付时间:</text>
|
|
<text>{{order.createTime}}</text>
|
|
</view>
|
|
|
|
<view class="cell">
|
|
<text class="label">收款时间</text>
|
|
<text style="margin-left: 60rpx;">{{order.paymentTime === null ? '会员未确认收货' : order.paymentTime}}</text>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
<uni-load-more :status="loading"></uni-load-more>
|
|
|
|
<!-- 左侧菜单 -->
|
|
<uni-drawer ref="drawer" mode="right" :width="320">
|
|
<scroll-view scroll-y :style="{height: swiperHeight+'px'}">
|
|
<view class="drawer">
|
|
<view class="title">付款单号</view>
|
|
<view class="inputBox">
|
|
<input type="number" v-model="orderNumber" class="input" placeholder="请输入付款单号">
|
|
<text class="iconfont del" v-if="orderNumber" @click="orderNumber=''"></text>
|
|
</view>
|
|
|
|
<view class="title">付款方式</view>
|
|
<view class="grid">
|
|
<view class="grid-item" :class="{'active':walletIndex === i}" v-for="(item, i) in walletList" :key="i" @click="tabsSelect(i)">
|
|
<text>{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="title">手机号查询</view>
|
|
<view class="flex flex-between">
|
|
<view class="inputBox">
|
|
<input type="number" :maxlength="3" v-model="frontMobile" class="input" placeholder="手机号前三位">
|
|
<text class="iconfont del" v-if="frontMobile" @click="frontMobile=''"></text>
|
|
</view>
|
|
<text class="xian">——</text>
|
|
<view class="inputBox">
|
|
<input type="number" :maxlength="4" v-model="afterMobile" class="input" placeholder="手机号后四位">
|
|
<text class="iconfont del" v-if="afterMobile" @click="afterMobile=''"></text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="flex flex-between btns">
|
|
<view class="btn" @click="onReset">重置</view>
|
|
<view class="btn right" @click="onSave">确定</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</uni-drawer>
|
|
<u-action-sheet
|
|
:show="showStatus"
|
|
:actions="actions"
|
|
title="请选择收款状态"
|
|
@close="showStatus = false"
|
|
@select="handlerSelect"
|
|
>
|
|
</u-action-sheet>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import vTabs from "@/components/v-tabs/v-tabs.vue"
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
import uniDrawer from "@/components/uni-drawer/uni-drawer.vue"
|
|
import url from "@/common/http/url.js"
|
|
import dayjs from 'dayjs';
|
|
const date = new Date().getTime()
|
|
export default{
|
|
components: { uniLoadMore, uniDrawer },
|
|
data(){
|
|
return {
|
|
swiperHeight: 0,
|
|
list: [],
|
|
loading: "loading",
|
|
walletIndex: 0,
|
|
walletList: [
|
|
{name: "全部", value: -1},
|
|
{name: "余额钱包", value: 1},
|
|
{name: "微信", value: 2},
|
|
{name: "支付宝", value: 3}
|
|
],
|
|
orderNumber: "",
|
|
frontMobile: "",
|
|
afterMobile: "",
|
|
showStatus: false,
|
|
actions: [
|
|
{
|
|
name: '待确认收货',
|
|
index: 0
|
|
},
|
|
{
|
|
name: '货款已入账',
|
|
index: 1
|
|
}
|
|
],
|
|
form: {
|
|
orderSn: null,
|
|
status: null,
|
|
startTime: "",
|
|
endTime: ""
|
|
},
|
|
showDate: false,
|
|
value1: Number(new Date()),
|
|
timeType: 'start'
|
|
}
|
|
},
|
|
onNavigationBarButtonTap(){
|
|
this.$refs.drawer.open()
|
|
},
|
|
onReachBottom() {
|
|
this.loadData(false);
|
|
},
|
|
onPullDownRefresh() {
|
|
this.loadData();
|
|
},
|
|
onLoad(opt) {
|
|
this.swiperHeight = uni.getSystemInfoSync().windowHeight
|
|
if (opt.type == 1) {
|
|
this.form.startTime = dayjs(date).format('YYYY-MM-DD');
|
|
this.form.endTime = dayjs(date).format('YYYY-MM-DD')
|
|
} else if (opt.type == 2) {
|
|
this.form.startTime = dayjs(date).format('YYYY-MM-DD');
|
|
this.form.endTime = dayjs(date).format('YYYY-MM-DD')
|
|
this.form.status = 1
|
|
}
|
|
//获取订单信息
|
|
this.loadData();
|
|
},
|
|
methods:{
|
|
handlerDate (type) {
|
|
this.showDate = true;
|
|
this.timeType = type;
|
|
},
|
|
handlerConfirm (e) {
|
|
console.log(e)
|
|
if (this.timeType == 'start') this.form.startTime = dayjs(e.value).format("YYYY-MM-DD");
|
|
else this.form.endTime = dayjs(e.value).format("YYYY-MM-DD");
|
|
this.showDate = false;
|
|
},
|
|
handlerSearch () {
|
|
this.list = [];
|
|
this.pageNum = this.list.length;
|
|
this.loadData();
|
|
},
|
|
handlerSelect (e) {
|
|
console.log(e)
|
|
let { index } = e;
|
|
this.form.status = index;
|
|
},
|
|
loadData(){
|
|
this.loading = "loading"
|
|
let params = {
|
|
pageNum: this.list.length,
|
|
paymentMethod: this.walletList[this.walletIndex].value,
|
|
orderNumber: this.orderNumber,
|
|
frontMobile: this.frontMobile,
|
|
afterMobile: this.afterMobile,
|
|
collectionMoneyStatus: this.form.status,
|
|
startTime: this.form.startTime,
|
|
endTime: this.form.endTime
|
|
}
|
|
this.$http("GET", url.store.getCollectionRecordList, params).then(res => {
|
|
this.list = this.list.concat(res.data)
|
|
if (this.list.length < res.data.length) {
|
|
this.loading = "more"
|
|
} else {
|
|
this.loading = "nomore"
|
|
}
|
|
uni.stopPullDownRefresh()
|
|
}).catch(()=>{
|
|
this.loading = "nomore"
|
|
uni.stopPullDownRefresh()
|
|
})
|
|
|
|
},
|
|
filterWallet(val){
|
|
let name = "其他"
|
|
if (val === 1) {
|
|
name = '余额钱包'
|
|
}
|
|
if (val === 2) {
|
|
name = '微信'
|
|
}
|
|
if (val === 3) {
|
|
name = '支付宝'
|
|
}
|
|
if (val === 4) {
|
|
name = '第三方支付'
|
|
}
|
|
if (val === 5) {
|
|
name = '余额+绿色积分'
|
|
}
|
|
if (val === 6) {
|
|
name = '微信+绿色积分'
|
|
}
|
|
/* this.walletList.forEach(v => {
|
|
if (v.value === val){
|
|
name = v.name
|
|
return
|
|
}
|
|
}) */
|
|
return name
|
|
},
|
|
jumpTo(imAccount){
|
|
this.$navigateTo("/pages/interaction/user?userId="+imAccount)
|
|
},
|
|
tabsSelect(i){
|
|
this.walletIndex = i
|
|
},
|
|
onReset(){
|
|
this.walletIndex = 0
|
|
this.orderNumber = ""
|
|
this.afterMobile = ""
|
|
this.frontMobile = ""
|
|
},
|
|
onSave(){
|
|
this.$refs.drawer.close()
|
|
this.list = []
|
|
this.loadData()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.main{
|
|
padding: 0 30rpx;
|
|
}
|
|
.list{
|
|
&-item{
|
|
background-color: white;
|
|
border-radius: 10rpx;
|
|
margin-bottom: 30rpx;
|
|
padding: 30rpx;
|
|
.user{
|
|
margin-bottom: 50rpx;
|
|
.logo{
|
|
width: 90rpx;
|
|
height: 90rpx;
|
|
border-radius: 50%;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|
|
.cell{
|
|
font-size: 30rpx;
|
|
margin-top: 30rpx;
|
|
.label{
|
|
width: 160rpx;
|
|
color: #999999;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.drawer{
|
|
padding: 0 30rpx;
|
|
.title{
|
|
font-size: 32rpx;
|
|
margin-top: 50rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
.xian{
|
|
margin: 0 30rpx;
|
|
color: #999999;
|
|
}
|
|
.inputBox{
|
|
background-color: #F8F8F8;
|
|
padding: 10rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-radius: 10rpx;
|
|
.input{
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
font-size: 30rpx;
|
|
flex: 1;
|
|
}
|
|
.del{
|
|
color: #999999;
|
|
font-size: 40rpx;
|
|
margin-left: 10rpx;
|
|
}
|
|
}
|
|
.grid{
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin-bottom: 30rpx;
|
|
&-item{
|
|
margin-right: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
width: 240rpx;
|
|
height: 70rpx;
|
|
border-radius: 10rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 28rpx;
|
|
background-color: #f3f4f3;
|
|
color: #87878b;
|
|
}
|
|
.active{
|
|
background-color: rgba($color: #F8D247, $alpha: .3);
|
|
color: #F8D247;
|
|
}
|
|
}
|
|
.btns{
|
|
margin-top: 80rpx;
|
|
padding-bottom: 40rpx;
|
|
.btn{
|
|
width: 45%;
|
|
background-color: #f3f4f3;
|
|
color: #87878b;
|
|
font-size: 32rpx;
|
|
height: 80rpx;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
}
|
|
.right{
|
|
background-color: rgba($color: #F8D247, $alpha: .3);
|
|
color: #F8D247;
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|