| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <template>
- <view class="settle-page">
- <view style="font-size:36upx;margin-top:20upx;">累计已结账:¥{{totalAmount}}</view>
- <view scroll-y class="settle-list">
- <block v-if="!$util.isEmpty(list.data)">
- <SettleItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></SettleItem>
- </block>
- <block v-else>
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
- </block>
- </view>
- </view>
- </template>
- <script>
- import SettleItem from "./settleOrderItem";
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
- import { list } from "@/mixins";
- import { getList } from "@/api/settle";
- export default {
- components: {
- SettleItem,
- AppWrapperEmpty
- },
- mixins: [list],
- data() {
- return {
- totalAmount:0
- }
- },
- onPullDownRefresh() {
- this.resetList();
- this.getSettleList().then(res => {
- uni.stopPullDownRefresh();
- });
- },
- onReachBottom() {
- if (!this.list.finished) {
- this.getSettleList().then((res) => {
- uni.stopPullDownRefresh();
- });
- } else {
- uni.stopPullDownRefresh();
- }
- },
- methods: {
- async init() {
- this.getSettleList();
- },
- getSettleList() {
- let options = {
- page: this.list.page,
- pageSize: this.list.pageSize,
- customId:this.option.customId
- };
- return getList(options).then(res => {
- this.totalAmount = res.data.totalAmount ? parseFloat(res.data.totalAmount) : 0
- this.completes(res);
- })
- },
- gotoDetail(item) {
- uni.navigateTo({
- url: `/admin/settle/detail?id=${item.id}`,
- success: result => {},
- fail: () => {},
- complete: () => {}
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .settle-page {
- height: 100%;
- display: flex;
- flex-direction: column;
- background-color: #f9fbfc;
- .settle-list {
- padding-top: 20upx;
- padding-bottom: 80upx;
- flex: 1;
- .settle-item {
- margin-bottom: 1upx;
- padding: 30upx;
- display: flex;
- align-items: center;
- box-shadow: 0upx 1upx 0upx 0upx #eeeeee;
- background-color: #fff;
- .info {
- flex: 1;
- margin-right: 20upx;
- .info-order {
- font-size: 32upx;
- font-weight: 600;
- color: #333333;
- }
- .info-name {
- margin: 40upx 0 20upx;
- font-size: 28upx;
- font-weight: 400;
- color: #666666;
- }
- .info-time {
- margin-right: 30upx;
- font-size: 28upx;
- font-weight: 400;
- color: #666666;
- }
- }
- .status {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex-shrink: 0;
- width: 100upx;
- color: #cccccc;
- .status-name {
- margin-top: 10upx;
- font-size: 24upx;
- }
- .iconfont {
- font-size: 46upx;
- }
- &.primary {
- color: #3385ff;
- }
- &.gray {
- color: #cccccc;
- }
- &.warn {
- color: #ffaf1d;
- }
- }
- }
- }
- .bar-view {
- flex-shrink: 0;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding: 0 30upx;
- width: 100%;
- height: 100upx;
- box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
- .btn-view {
- display: flex;
- .admin-button-com {
- margin: 0 10upx;
- width: 140upx;
- }
- }
- }
- }
- </style>
|