|
@@ -13,31 +13,32 @@
|
|
|
</view>
|
|
|
<image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
|
|
|
</view>
|
|
|
- <scroll-view class="scroll-con" scroll-y @scrolltolower="onreachBottom">
|
|
|
+ <scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
|
|
|
<!-- 列表数据 -->
|
|
|
<view class="cell-item-con">
|
|
|
<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.creatDate}}</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.account}}</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.num>0 ? 'red' : 'blue']">{{item.num > 0 ? '+' + item.num : item.num }}</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.des ? item.des : '--'}}</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.state" class="handle-btn" hover-class="none" :custom-style="customBtnStyle" @click="revokeFun(item)">撤销单据</u-button>
|
|
|
- <text v-else style="color: #909399;">单据已撤销</text>
|
|
|
+ <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>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -51,17 +52,12 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import searchModal from './searchModal.vue'
|
|
|
+ import { getGoldLogList, GoldLogCancel } from '@/api/officialPartnerGoldLog.js'
|
|
|
export default {
|
|
|
components: { searchModal },
|
|
|
data() {
|
|
|
return {
|
|
|
- listdata: [
|
|
|
- { creatDate: '2020-11-05 17:13', account: '15787878787', num: 154, state: 1, des: '备注备注备注11221备注'},
|
|
|
- { creatDate: '2020-11-05 17:13', account: '15787878787', num: -15, state: 1, des: '描述秒回的时刻萨菲科技尸鬼封尽看嘎是否1备注'},
|
|
|
- { creatDate: '2020-11-05 17:13', account: '15000000000', num: 4, state: 0, des: '备注备注备注11221备注'},
|
|
|
- { creatDate: '2020-11-05 17:13', account: '15787878787', num: -8, state: 1, des: ''},
|
|
|
- { creatDate: '2020-11-05 17:13', account: '15787878787', num: 50, state: 0, des: '备注备注备注11221备注'},
|
|
|
- ],
|
|
|
+ listdata: [],
|
|
|
pageNo: 1, // 当前页码
|
|
|
pageSize: 10, // 每页条数
|
|
|
total: 0, // 数据总条数
|
|
@@ -71,13 +67,14 @@
|
|
|
searchForm: { // 查询条件
|
|
|
beginDate: '', // 创建时间默认筛选近7天
|
|
|
endDate: '', // 创建时间默认筛选近7天
|
|
|
- account: '' // 支付账户
|
|
|
+ customerMobile: '' // 支付账户
|
|
|
},
|
|
|
customBtnStyle: { // 撤销单据 自定义按钮样式
|
|
|
borderColor: '#2ab4e5',
|
|
|
backgroundColor: '#2ab4e5',
|
|
|
color: '#fff'
|
|
|
- }
|
|
|
+ },
|
|
|
+ scrollTop: 0, // 滚动条位置
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
@@ -93,13 +90,18 @@
|
|
|
},
|
|
|
// 撤销单据
|
|
|
revokeFun(row){
|
|
|
- let _this = this
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -108,26 +110,29 @@
|
|
|
searchHandle (pageNo) {
|
|
|
this.status = "loading"
|
|
|
pageNo ? this.pageNo = pageNo : null
|
|
|
- // searchSuppliers({
|
|
|
- // pageNo: this.pageNo,
|
|
|
- // pageSize: this.pageSize,
|
|
|
- // queryWord: this.queryValue
|
|
|
- // }).then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // if(this.pageNo>1){
|
|
|
- // this.listdata = this.listdata.concat(res.data.list || [])
|
|
|
- // }else{
|
|
|
- // this.listdata = res.data.list || []
|
|
|
- // }
|
|
|
- // this.total = res.data.count || 0
|
|
|
- // this.listdata.length == 0 && this.queryValue != '' ? this.noDataText = '没有搜索到相关结果' : this.noDataText = '暂无数据'
|
|
|
- // } else {
|
|
|
- // this.noDataText = res.message
|
|
|
- // this.listdata = []
|
|
|
- // this.total = 0
|
|
|
- // }
|
|
|
+ getGoldLogList({
|
|
|
+ pageNo: this.pageNo,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ beginDate: this.searchForm.beginDate,
|
|
|
+ endDate: this.searchForm.endDate,
|
|
|
+ customerMobile: this.searchForm.customerMobile
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ if(this.pageNo>1){
|
|
|
+ this.listdata = this.listdata.concat(res.data.list || [])
|
|
|
+ }else{
|
|
|
+ this.listdata = res.data.list || []
|
|
|
+ this.scrollTop = 0
|
|
|
+ }
|
|
|
+ this.total = res.data.count || 0
|
|
|
+ this.noDataText = '暂无数据'
|
|
|
+ } else {
|
|
|
+ this.noDataText = res.message
|
|
|
+ this.listdata = []
|
|
|
+ this.total = 0
|
|
|
+ }
|
|
|
this.status = "loadmore"
|
|
|
- // })
|
|
|
+ })
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|
|
|
onreachBottom() {
|