123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <template>
- <view>
- <view class="tab" style="height: 110px;">
- <u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
- <view style="display: flex;margin-top: 10px;z-index: 999;">
- <view class="searchDate" @click="show=!show">{{param.declTime}}</view>
- <!-- <u--input placeholder="选择日期" border="surround" v-model="param.declTime" clearable readonly @click="show=!show"> -->
- </u--input>
- <view class="reset_btn" @click="cleanDate">重置</view>
- </view>
- <u-calendar :show="show" minDate="2024-08-15" :insert="false" title="选择日期" @confirm="confirm"></u-calendar>
- </view>
- <view class="goodsList">
- <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
- <view class="title">{{ item.shopName }}
- <view v-if="item.hzsConfirmStatus==0">
- <view class="state">
- <text class="icon"></text>
- <text>未确认</text>
- </view>
- </view>
- <view v-else>
- <view class="state" v-if="item.finishStatus == 1">
- <text class="icon"></text>
- <text>已结算</text>
- </view>
- <view class="state" v-else>
- <text class="icon"></text>
- <text>未结算</text>
- </view>
- </view>
- </view>
- <view class="con">
- <view class="productName omit" style="font-size: 16px;">{{ item.goodsNames }}</view>
- <view class="desc omit">
- <text>
- {{ item.fieldName }}</text>
- </view>
- <view class="desc">
- <text>重量 {{ item.sumGrossWt }}</text>
- <text>| 车辆 {{ item.veNo }}</text>
- <text v-if="item.orderCount"> | 订单 {{ item.orderCount }}</text>
- </view>
- <view class="price"> ¥ {{ item.sumAmt }}</view>
- </view>
- <view class="clear"></view>
- <view class="op">
- <view class="date">申报时间 {{ item.declTime.substr(0,16) }}</view>
- <template>
- <view class="an detail_btn" @click.stop="detail(item)">边民订单</view>
- </template>
- </view>
- </view>
- <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
- <u-empty v-if="!loadMore && list.length == 0"></u-empty>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- tab: [{
- name: '全部',
- finishStatus: '', //订单完成状态
- resaleStatus: '' //订单转售状态
- },
- {
- name: '未确认',
- finishStatus: 0,
- hzsConfirmStatus: 0
- },
- {
- name: '未结算',
- finishStatus: 0,
- hzsConfirmStatus: 1
- },
- {
- name: '已结算',
- finishStatus: 1,
- hzsConfirmStatus: 1
- },
- ],
- show: false,
- param: {
- pageNo: 1,
- pageSize: 10,
- declTime: '选择日期',
- sortType: 25
- },
- list: [],
- loadMore: true,
- id: '',
- flag: '',
- };
- },
- onLoad() {
- this.getData()
- },
- onShow() {},
- methods: {
- cleanDate() {
- this.param.declTime = '选择日期';
- this.param.pageNo = 1;
- this.getData()
- },
- confirm(days) {
- this.param.declTime = days[0];
- this.show = false;
- this.getData()
- },
- getData() {
- let params = JSON.parse(JSON.stringify(this.param));
- if (params.declTime == '选择日期') {
- params.declTime = '';
- }
- this.http.request({
- url: '/level-one-server/app/HtTradeSettlement/getList',
- loading: 'false',
- data: params,
- success: res => {
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
- if (res.data.data) {
- this.list.push(...res.data.data);
- }
- if (this.param.pageNo == 1 && res.data.data && res.data.data.length == 0) {
- this.list = []
- }
- }
- });
- },
- // 点击tab切换
- click(e) {
- this.param.finishStatus = e.finishStatus;
- this.getData();
- },
- detail(item) {
- uni.navigateTo({
- url: '/pages/market/one/cooperative/peopleOrders?mainId=' + item.id + '&goodsName=' + item
- .goodsNames + '&veNo=' + item.veNo + '&declTime=' + item.declTime + '&sumGrossWt=' + item
- .sumGrossWt
- });
- },
- },
- //下拉刷新
- onPullDownRefresh() {
- this.param.pageNo = 1;
- this.param.declTime = '';
- setTimeout(() => {
- this.getData();
- uni.stopPullDownRefresh();
- }, 1000);
- },
- //上拉加载
- onReachBottom() {
- if (this.loadMore) {
- this.param.pageNo++;
- this.getData();
- }
- }
- };
- </script>
- <style lang="scss">
- page {
- background-color: $pg;
- }
- .state {
- margin-right: -70px;
- }
- .goodsList {
- .item {
- .con {
- width: 90%;
- .desc {
- uni-text {
- padding-right: 5px;
- }
- }
- }
- }
- }
- .tab {
- .searchDate {
- width: 60%;
- font-size: 15px;
- border-radius: 5px;
- padding: 10px;
- color: #545555;
- background-color: #f6f6f6;
- margin-left: 10px;
- }
- .reset_btn {
- line-height: 35px;
- padding: 0 15px;
- border: 1px solid #e2e2e2;
- border-radius: 8px;
- margin-left: 10px;
- background: #e2e2e2
- }
- }
- .detail_btn {
- border: 1px solid;
- padding: 4px 7px;
- border-radius: 6px;
- background: #2f64c3;
- color: #ffff;
- }
- </style>
|