|
@@ -1,46 +1,30 @@
|
|
<template>
|
|
<template>
|
|
- <view class="homePage-container">
|
|
|
|
- <!-- 筛选弹框 -->
|
|
|
|
- <search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
|
|
|
|
- <view class="homePage-head">
|
|
|
|
- <view class="head-con">
|
|
|
|
- <text class="homePage-tit">交易记录</text>
|
|
|
|
- <view class="total-con">
|
|
|
|
- 总计:
|
|
|
|
- <text class="goleNum">{{ldTotal}}</text>
|
|
|
|
- <image src="/static/ledou.png" class="ld-icon"></image>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="unclear-container">
|
|
<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
|
|
<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
|
|
<!-- 列表数据 -->
|
|
<!-- 列表数据 -->
|
|
<view class="cell-item-con">
|
|
<view class="cell-item-con">
|
|
<view class="cell-item" v-for="(item, index) in listdata" :key="index">
|
|
<view class="cell-item" v-for="(item, index) in listdata" :key="index">
|
|
- <view class="cell-item-c">
|
|
|
|
- <view class="cell-item-label">交易时间</view>
|
|
|
|
- <view class="cell-item-main">{{item.createDate}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="cell-item-c">
|
|
|
|
- <view class="cell-item-label">支付账户</view>
|
|
|
|
- <view class="cell-item-main">{{item.customerMobile}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="cell-item-c">
|
|
|
|
- <view class="cell-item-label">交易数量(个)</view>
|
|
|
|
- <view :class="['cell-item-main', item.changeType=='ADD' ? 'red' : 'blue']">{{item.changeType=='ADD' ? '+' : item.changeType=='SUB' ? '-' : ''}}{{ item.changeNum }}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="cell-item-c">
|
|
|
|
- <view class="cell-item-label">备注</view>
|
|
|
|
- <view class="cell-item-main">{{item.remarks ? item.remarks : '--'}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="cell-item-c handle-con">
|
|
|
|
- <view class="cell-item-label">操作</view>
|
|
|
|
- <view class="cell-item-main">
|
|
|
|
- <u-button size="mini" v-if="item.changeType=='ADD' && item.cancelFlag==0" class="handle-btn" hover-class="none" :custom-style="customBtnStyle" @click="revokeFun(item)">撤销单据</u-button>
|
|
|
|
- <text v-if="item.changeType=='ADD' && item.cancelFlag==1" style="color: #909399;">单据已撤销</text>
|
|
|
|
- <text v-if="item.changeType=='SUB'" style="color: #909399;">扫码支付撤销</text>
|
|
|
|
|
|
+ <u-image class="cell-item-pic" src="/static/logo.jpg" width="140rpx" height="140rpx"></u-image>
|
|
|
|
+ <view class="cell-item-c" @tap="goPage(item)">
|
|
|
|
+ <view class="cell-item-info">
|
|
|
|
+ <view class="cell-item-info-network">
|
|
|
|
+ 咸阳市秦都区文彩舫东区
|
|
|
|
+ <u-badge type="success" :count="8" :offset="[-10,-32]" size="mini"></u-badge>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="cell-item-info-weight">
|
|
|
|
+ <view class="cell-item-weight-bar">
|
|
|
|
+ 15.25kg
|
|
|
|
+ <u-badge class="badge" type="primary" count="总" :offset="[0,0]"></u-badge>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="cell-item-weight-bar">
|
|
|
|
+ 15.25kg
|
|
|
|
+ <u-badge class="badge" type="warning" count="最大" :offset="[0,0]"></u-badge>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-icon name="arrow-right" class="arrow-right" :size="28" color="#999"></u-icon>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-button size="mini" class="handle-btn" hover-class="none" :custom-style="customBtnStyle" @click="removeFun(item)">移除</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
|
|
<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
|
|
@@ -48,80 +32,51 @@
|
|
<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
|
|
<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+
|
|
|
|
+ <view class="footer-bar">
|
|
|
|
+ <u-button class="footer-handle-btn scan-btn" :custom-style="btnStyle" shape="circle" @click="openQuery" size="medium" type="primary">
|
|
|
|
+ <u-icon name="scan" class="btn-icon" :size="28" color="#fff"></u-icon>
|
|
|
|
+ <text>扫码清运</text>
|
|
|
|
+ </u-button>
|
|
|
|
+ <u-button class="footer-handle-btn" :custom-style="btnStyle" shape="circle" @click="openQuery" size="medium">
|
|
|
|
+ <u-icon name="plus" class="btn-icon" :size="28" color="#fff"></u-icon>
|
|
|
|
+ <text>增加清运网点</text>
|
|
|
|
+ </u-button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- import searchModal from './searchModal.vue'
|
|
|
|
import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
|
|
import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
|
|
export default {
|
|
export default {
|
|
- components: { searchModal },
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- listdata: [],
|
|
|
|
|
|
+ listdata: [{},{}],
|
|
pageNo: 1, // 当前页码
|
|
pageNo: 1, // 当前页码
|
|
pageSize: 10, // 每页条数
|
|
pageSize: 10, // 每页条数
|
|
total: 0, // 数据总条数
|
|
total: 0, // 数据总条数
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
status: 'loadmore', // 加载中状态
|
|
status: 'loadmore', // 加载中状态
|
|
- openScreen: false, // 是否打开筛选
|
|
|
|
- searchForm: { // 查询条件
|
|
|
|
- beginDate: '', // 创建时间默认筛选近7天
|
|
|
|
- endDate: '', // 创建时间默认筛选近7天
|
|
|
|
- customerMobile: '' // 支付账户
|
|
|
|
- },
|
|
|
|
customBtnStyle: { // 撤销单据 自定义按钮样式
|
|
customBtnStyle: { // 撤销单据 自定义按钮样式
|
|
borderColor: '#2ab4e5',
|
|
borderColor: '#2ab4e5',
|
|
backgroundColor: '#2ab4e5',
|
|
backgroundColor: '#2ab4e5',
|
|
color: '#fff'
|
|
color: '#fff'
|
|
},
|
|
},
|
|
scrollTop: 0, // 滚动条位置
|
|
scrollTop: 0, // 滚动条位置
|
|
- ldTotal: 0 // 乐豆总计数
|
|
|
|
|
|
+ btnStyle: { // 撤销单据 自定义按钮样式
|
|
|
|
+ width: '100%'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.openScreen = false // 关闭筛选框
|
|
|
|
this.refresh({})
|
|
this.refresh({})
|
|
|
|
+ console.log(wx.getMenuButtonBoundingClientRect())
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
- // 总计
|
|
|
|
- getGoldLogTotal(){
|
|
|
|
- GoldLogTotal({
|
|
|
|
- beginDate: this.searchForm.beginDate,
|
|
|
|
- endDate: this.searchForm.endDate,
|
|
|
|
- customerMobile: this.searchForm.customerMobile
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.status == 200){
|
|
|
|
- this.ldTotal = res.data ? res.data.changeNum : 0
|
|
|
|
- }else{
|
|
|
|
- this.ldTotal = 0
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 获取查询参数 刷新列表
|
|
// 获取查询参数 刷新列表
|
|
refresh(params){
|
|
refresh(params){
|
|
- this.searchForm = params
|
|
|
|
this.listdata = []
|
|
this.listdata = []
|
|
this.total = 0
|
|
this.total = 0
|
|
this.searchHandle(1)
|
|
this.searchHandle(1)
|
|
- this.getGoldLogTotal()
|
|
|
|
- },
|
|
|
|
- // 撤销单据
|
|
|
|
- revokeFun(row){
|
|
|
|
- const _this = this
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '撤销单据后乐豆将全部退回给原支付账号,确认撤销吗?',
|
|
|
|
- success(res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- GoldLogCancel({ id: row.id }).then(ret => {
|
|
|
|
- if(ret.status == 200){
|
|
|
|
- uni.showToast({ title: ret.message, icon: 'none' })
|
|
|
|
- _this.searchHandle(1)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
// 搜索查询
|
|
// 搜索查询
|
|
searchHandle (pageNo) {
|
|
searchHandle (pageNo) {
|
|
@@ -129,10 +84,7 @@
|
|
pageNo ? this.pageNo = pageNo : null
|
|
pageNo ? this.pageNo = pageNo : null
|
|
getGoldLogList({
|
|
getGoldLogList({
|
|
pageNo: this.pageNo,
|
|
pageNo: this.pageNo,
|
|
- pageSize: this.pageSize,
|
|
|
|
- beginDate: this.searchForm.beginDate,
|
|
|
|
- endDate: this.searchForm.endDate,
|
|
|
|
- customerMobile: this.searchForm.customerMobile
|
|
|
|
|
|
+ pageSize: this.pageSize
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if(this.pageNo>1){
|
|
if(this.pageNo>1){
|
|
@@ -151,6 +103,30 @@
|
|
this.status = "loadmore"
|
|
this.status = "loadmore"
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 移除
|
|
|
|
+ removeFun(row){
|
|
|
|
+ const _this = this
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确认移除该网点的清运单?',
|
|
|
|
+ success(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ // GoldLogCancel({ id: row.id }).then(ret => {
|
|
|
|
+ // if(ret.status == 200){
|
|
|
|
+ // uni.showToast({ title: ret.message, icon: 'none' })
|
|
|
|
+ // _this.searchHandle(1)
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 查看详情
|
|
|
|
+ goPage(row){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/cleared/details'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// scroll-view到底部加载更多
|
|
// scroll-view到底部加载更多
|
|
onreachBottom() {
|
|
onreachBottom() {
|
|
if(this.listdata.length < this.total){
|
|
if(this.listdata.length < this.total){
|
|
@@ -169,113 +145,93 @@
|
|
page{
|
|
page{
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
- .homePage-container {
|
|
|
|
|
|
+ .unclear-container {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- padding-top: 102rpx;
|
|
|
|
- // 筛选菜单
|
|
|
|
- .homePage-head{
|
|
|
|
- font-size: 30rpx;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- position: fixed;
|
|
|
|
- top: 0;
|
|
|
|
- left: 0;
|
|
|
|
- z-index: 9;
|
|
|
|
- padding: 26rpx 30rpx;
|
|
|
|
- background-color: #fff;
|
|
|
|
- box-shadow: 0rpx 0rpx 14rpx rgba(0,0,0,.05);
|
|
|
|
- width: 100%;
|
|
|
|
- border-top: 10rpx solid #f8f8f8;
|
|
|
|
- .head-con{
|
|
|
|
- flex-grow: 1;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- .homePage-tit{
|
|
|
|
- color: #040301;
|
|
|
|
- }
|
|
|
|
- .total-con{
|
|
|
|
- color: #040301;
|
|
|
|
- .goleNum{
|
|
|
|
- color: #eb0000;
|
|
|
|
- font-size: 30rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
- .ld-icon{
|
|
|
|
- width: 30rpx;
|
|
|
|
- height: 30rpx;
|
|
|
|
- margin: 0 0 0 10rpx;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .filter-icon{
|
|
|
|
- flex-shrink: 0;
|
|
|
|
- width: 36rpx;
|
|
|
|
- height: 36rpx;
|
|
|
|
- padding-left: 20rpx;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ padding-bottom: 204rpx;
|
|
// 列表
|
|
// 列表
|
|
.scroll-con{
|
|
.scroll-con{
|
|
flex: 1;
|
|
flex: 1;
|
|
- // height: calc(100% - 40);
|
|
|
|
overflow: auto;
|
|
overflow: auto;
|
|
}
|
|
}
|
|
// 列表样式
|
|
// 列表样式
|
|
.cell-item-con{
|
|
.cell-item-con{
|
|
- margin: 20rpx;
|
|
|
|
.cell-item{
|
|
.cell-item{
|
|
|
|
+ margin: $uni-spacing-col-base $uni-spacing-row-base;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
- color: #606266;
|
|
|
|
- padding: 0 30rpx;
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
- border-radius: 16rpx;
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
|
+ border-radius: $uni-border-radius-base;
|
|
|
|
+ color: $uni-text-color;
|
|
|
|
+ font-size: $uni-font-size-base;
|
|
box-shadow: 3rpx 3rpx 5rpx #eee;
|
|
box-shadow: 3rpx 3rpx 5rpx #eee;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ padding: $uni-spacing-col-base $uni-spacing-row-base;
|
|
|
|
+ position: relative;
|
|
|
|
+ .cell-item-pic{
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ margin-right: 10rpx;
|
|
|
|
+ }
|
|
.cell-item-c{
|
|
.cell-item-c{
|
|
|
|
+ flex-grow: 1;
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: space-between;
|
|
|
|
- padding: 18rpx 0;
|
|
|
|
- border-bottom: 1rpx solid #f2f2f2;
|
|
|
|
- .cell-item-label{
|
|
|
|
- flex-shrink: 0;
|
|
|
|
- width: 200rpx;
|
|
|
|
- color: #303133;
|
|
|
|
- }
|
|
|
|
- .cell-item-main{
|
|
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .cell-item-info{
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
- text-align: right;
|
|
|
|
- .handle-btn{
|
|
|
|
- border-color: #fcbd71!important;
|
|
|
|
- background-color: #fcbd71!important;
|
|
|
|
|
|
+ .cell-item-info-network{
|
|
|
|
+ word-break: break-all;
|
|
|
|
+ margin-bottom: $uni-spacing-col-base;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ position: relative;
|
|
|
|
+ }
|
|
|
|
+ .cell-item-info-weight{
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ .cell-item-weight-bar{
|
|
|
|
+ position: relative;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ padding-right: 50rpx;
|
|
|
|
+ &:nth-child(2){
|
|
|
|
+ padding-right: 76rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .blue {
|
|
|
|
- color: #1890FF;
|
|
|
|
- }
|
|
|
|
- .green {
|
|
|
|
- color: #16b50e;
|
|
|
|
- }
|
|
|
|
- .red {
|
|
|
|
- color: red;
|
|
|
|
- }
|
|
|
|
- &:last-child{
|
|
|
|
- border: none;
|
|
|
|
|
|
+ .arrow-right{
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ margin-left: 64rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .handle-con{
|
|
|
|
- align-items: center;
|
|
|
|
- // margin-top: 10rpx;
|
|
|
|
- // padding-top: 18rpx;
|
|
|
|
- // padding: 0;
|
|
|
|
|
|
+ .handle-btn{
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: $uni-spacing-row-sm;
|
|
|
|
+ top: $uni-spacing-col-sm;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .footer-bar{
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 204rpx;
|
|
|
|
+ padding: 0 10%;
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ text-align: center;
|
|
|
|
+ .footer-handle-btn{
|
|
|
|
+ display: block;
|
|
|
|
+ .btn-icon{
|
|
|
|
+ margin-right: 10rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .scan-btn{
|
|
|
|
+ margin-top: 24rpx;
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|