| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478 |
- <template>
- <view :class="[AppTheme]" class="container">
- <!-- 头部切换 -->
- <!-- #ifdef APP-PLUS || MP-WEIXIN -->
- <u-sticky offsetTop="0" style="z-index: 10;">
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <u-sticky offsetTop="-44" style="z-index: 10;">
- <!-- #endif -->
- <view class="head_fixation">
- <u-tabs :scrollable="false" ref="uTabs" :list="navList" lineWidth="30" :lineColor="primary"
- :activeStyle="{
- color: primary,
- transform: 'scale(1.05)'
- }" :inactiveStyle="{
- color: '#606266',
- transform: 'scale(1)'
- }" :current="current" @click="tabsChange">
- </u-tabs>
- </view>
- </u-sticky>
- <!-- 订单列表 -->
- <view class="order_list">
- <view v-if="orderlist.length" class="order_item" v-for="(item, index) in orderlist" :key="index">
- <view class="model_one">
- <view class="model_two">
- <view></view>
- <view class="model_two_1">{{item.title}}</view>
- <view class="model_two_2">{{item.status}}</view>
- </view>
- <view class="model_three">
- <view class="model_three_1">
- <image :src="item.img"></image>
- </view>
- <view class="model_three_2">
-
- <view class="model_three_3">操作类型: {{item.operator_deatil}}</view>
- <view class="model_three_3">操作内容: {{item.content}}</view>
- <view class="model_three_3">备注: {{item.remark}}</view>
- </view>
- </view>
- <view class="model_four">
- <view class="model_four_1">
- <view class="model_four_2">操作对象</view>
- <view class="model_four_2">操作费用</view>
- <view class="model_four_2">操作员</view>
- </view>
- <view class="model_four_3">
- <view class="model_four_4">{{item.seed_name}}({{item.seed_num}}m²)</view>
- <view class="model_four_4">{{item.order_money}}</view>
- <view class="model_four_4" v-if="item.username">{{item.username}}</view>
- <view class="model_four_4" v-else>--</view>
- </view>
- </view>
- </view>
- </view>
- <u-loadmore v-if="orderlist.length" :line="true" :status="status" :dashed='false' />
- <view class="footer_bottom"></view>
- <!-- 订单为空显示 -->
- <view v-if="orderlist.length==0">
- <u-empty text="暂无订单" mode="order" margin-top="100" custom-style="#fff">
- </u-empty>
- </view>
- </view>
- <!-- 回到顶部 -->
- <u-back-top :scroll-top="scrollTop" :custom-style="customstyle"></u-back-top>
- </view>
- </template>
- <script>
- import Landapi from '@/api/land/index.js';
- import Mallapi from '@/api/mall/index.js';
- export default {
- data() {
- return {
- status: 'loadmore',
- primary: this.$theme.primary,
- settingFile: getApp().globalData.siteinfo,
- // 当前排序方式视图
- nowsetyindex: 1,
- // 订单列表
- orderlist: [],
- //顶部距离
- scrollTop: 0,
- modalshow: false,
- content: '该订单还未支付,是否先支付?',
- seorder: {},
- nowindex: 1, //当前列表分页
- customstyle: {
- background: '#F4F6F8'
- },
- navList: [{
- name: '待处理'
- },
- {
- name: '进行中'
- },
- {
- name: '已完成'
- }
- ],
- current: 0,
- swiperCurrent: 0,
- nomorelist: false,
- };
- },
- onLoad() {
- this.getorderlist(this.swiperCurrent+1, this.nowindex);
- },
- onPullDownRefresh() {
- console.log('下拉刷新了')
- this.nowindex = 1
- this.getorderlist(this.swiperCurrent, this.nowindex);
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 1500)
- },
- onReachBottom() {
- console.log('上拉加载了')
- this.nowindex++
- let parms = {
- p: this.nowindex,
- type: this.swiperCurrent
- };
- this.status = 'loading'
- Landapi.getoperator(parms).then(res => {
- if (res.status == 1) {
- if (res.data !== null && res.data !== undefined && res.data.length > 0) {
- // 获取服务套餐详情集合
- this.status = 'nomore'
- res.data.forEach(item => {
- that.orderlist.push(item);
- });
- if (res.data.length == 10) {
- this.status = 'loadmore'
- } else {
- this.status = 'nomore'
- }
- }
- } else {
- this.nowindex--
- this.status = "nomore"
- }
- })
- },
- onShow() {},
- methods: {
- // tabs通知swiper切换
- tabsChange(e) {
- this.nomorelist = false;
- this.nowindex = 1;
- if (this.swiperCurrent === e.index) {
- return;
- } else {
- this.swiperCurrent = e.index;
- this.orderlist = [];
- this.getorderlist(this.swiperCurrent + 1, this.nowindex);
- }
- },
- //获取订单列表
- getorderlist(type, p) {
- var that = this;
- let parms = {
- p: p,
- type: type
- };
- if (!this.nomorelist) {
- Landapi.getoperator(parms).then(res => {
- if (res.status == 1) {
- if (res.data !== null && res.data !== undefined && res.data.length > 0) {
- // 获取服务套餐详情集合
- this.orderlist = []
- res.data.forEach(item => {
- that.orderlist.push(item);
- });
- this.nowindex = p;
- this.status = 'nomore'
- if (res.data.length == 10) {
- this.status = 'loadmore'
- } else {
- this.status = 'nomore'
- }
- }
- } else {
- this.status = 'nomore'
- this.nomorelist = true;
- }
- });
- }
- },
- }
- };
- </script>
- <style lang="scss">
- .action-btn {
- width: 160upx;
- height: 60upx;
- margin: 0;
- margin-left: 24upx;
- padding: 0;
- text-align: center;
- line-height: 60upx;
- font-size: $font-sm + 2upx;
- background: #fff;
- border-radius: 100px;
- &:after {
- border-radius: 100px;
- }
- &.recom {
- background: #fff9f9;
- border-width: 1rpx;
- border-style: solid;
- }
- }
- .container {
- background: $page-color-base;
- height: 100%;
- box-sizing: border-box;
- }
- .nomorelist {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 30rpx;
- color: #333;
- margin-bottom: 20rpx;
- }
-
-
-
- .model_one{
- display: flex;
- flex-direction: column;
- .model_two{
- display: flex;
- justify-content: space-between;
- float: right;
- padding: 0 20rpx;
-
- .model_two_1{
- color: #333;
- font-weight: 600;
-
- }
- .model_two_2{
- color: red;
- font-size: 30rpx;
- }
-
- }
- .model_three{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- padding: 0 20rpx;
- .model_three_1{
-
- image{
- width: 150rpx;
- height: 150rpx;
- }
- }
- .model_three_2{
-
- color: #999;
- padding: 20rpx;
-
- .model_three_3{
- padding: 10rpx 0;
- font-size: 28rpx;
- }
- }
-
- }
- .model_four{
- display: flex;
- flex-direction: column;
- .model_four_1{
- display: flex;
- justify-content: space-between;
- padding: 20rpx 50rpx;
- .model_four_2{
- color: #999;
- font-size: 28rpx;
- }
- }
-
- .model_four_3{
- display: flex;
- justify-content: space-between;
- padding: 20rpx 50rpx;
-
-
- .model_four_4{
- font-size: 28rpx;
- text-align: center;
- height: 45rpx;
- line-height:45rpx;
- min-width: 15%;
-
- }
- }
- }
- }
-
-
-
-
-
-
- .tabbom {
- // margin: 85rpx 0 0 0;
- }
- .swiper-box {
- height: calc(100vh - 44px);
- overflow-y: auto;
- }
- .footer_bottom {
- width: 100%;
- height: 40rpx;
- }
- .anjnaa {
- width: 100%;
- height: 1rpx;
- }
- .head_fixation {
- width: 100%;
- z-index: 11;
- background-color: #ffffff;
- }
- .data_display {
- padding: 0 17.5rpx;
- background-color: #ffffff;
- font-variant: common-ligatures;
- }
- .sort_set {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: 75rpx;
- }
- .order_list {
- overflow-y: auto;
- height: 100%;
- }
- .sort_item {
- font-size: 32rpx;
- color: #333;
- padding-bottom: 15rpx;
- border-bottom: 3px solid transparent;
- }
- .order_item {
- width: 97%;
- margin: 25rpx auto;
- padding: 30rpx 0 0 0;
- background-color: #ffffff;
- border-radius: 15rpx;
- box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
- }
- .farm_name {
- font-size: 34rpx;
- color: #000;
- padding: 0 20rpx;
- }
- .bor_solp {
- background-color: #999;
- height: 1rpx;
- width: 100%;
- transform: scaleY(0.3);
- margin: 25rpx 0;
- }
- .order_detil {
- display: flex;
- justify-content: space-between;
- padding: 0 20rpx;
- }
- .seed_item_thumbnail {
- object-fit: cover;
- border-radius: 10rpx;
- width: 180rpx;
- height: 126rpx;
- }
- .right_deile {
- width: calc(100% - 215rpx);
- }
- .article_title_p1 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .atintl_icon {
- border-radius: 0 10rpx 0 10rpx;
- padding: 5rpx 10rpx;
- font-size: 28rpx;
- color: #ffffff;
- }
- .astin_text {
- font-size: 28rpx;
- color: #000;
- margin-left: 15rpx;
- }
- }
- .article_title_p2 {
- font-size: 26rpx;
- color: #000;
- margin: 25rpx 0;
- }
- .article_title_p3 {
- font-size: 26rpx;
- color: #000;
- }
- .pay_status {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20rpx;
- }
- .pay_status_text {
- font-size: 28rpx;
- }
- .pay_status_button {
- border-radius: 40rpx;
- color: #ffffff;
- min-width: 90rpx;
- height: 40rpx;
- padding: 10rpx 25rpx 10rpx 25rpx;
- line-height: 40rpx;
- font-size: 28rpx;
- text-align: center;
- margin: 0 10rpx;
- }
- .nsnnsss {
- display: flex;
- justify-content: flex-start;
- }
- </style>
|