|
|
@@ -1,54 +1,62 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <!-- tab -->
|
|
|
- <view class="tab-box ddflex">
|
|
|
- <view class="fflex ddflex">
|
|
|
- <view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
|
|
|
- <view>待确认</view>
|
|
|
- <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ <view class="top-box">
|
|
|
+ <view class="top-title">
|
|
|
+ <view v-if="!userInfo.storeId" @click="showPop=true" class="ddflex" :style="'height: '+ systems.navigationHeight + 'rpx;padding-top:' + systems.ktxStatusHeight + 'rpx;'+'line-height: '+ systems.navigationHeight + 'rpx;'">
|
|
|
+ <view>{{actMerchant.name}}</view>
|
|
|
+ <image class="dow-ssicon" src="../../static/pages/images/dow-ssicon.png"></image>
|
|
|
</view>
|
|
|
- <view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
|
|
|
- <view>已完成</view>
|
|
|
- <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="tab-box ddflex">
|
|
|
+ <view class="fflex ddflex">
|
|
|
+ <view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
|
|
|
+ <view>未完成</view>
|
|
|
+ <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ </view>
|
|
|
+ <view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
|
|
|
+ <view>已完成</view>
|
|
|
+ <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ </view>
|
|
|
+ <view :class="'tab-item fflex '+(!queryType?'tab-item-active':'')" @click="queryTypeChange(-1)">
|
|
|
+ <view>全部</view>
|
|
|
+ <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view :class="'tab-item fflex '+(queryType==3?'tab-item-active':'')" @click="queryTypeChange(3)">
|
|
|
- <view>全部</view>
|
|
|
- <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
+ <view class="ddflex">
|
|
|
+ <image class="saoma" src="../../static/pages/images/saoma.png"></image>
|
|
|
+ <image class="sousuo" src="../../static/pages/images/search.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="ddflex">
|
|
|
- <image class="saoma" src="../../static/pages/images/saoma.png"></image>
|
|
|
- <image class="sousuo" src="../../static/pages/images/search.png"></image>
|
|
|
- </view>
|
|
|
</view>
|
|
|
- <view style="height: 110rpx;"></view>
|
|
|
+
|
|
|
+ <view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106) + 'rpx;'"></view>
|
|
|
|
|
|
<!-- 订单 -->
|
|
|
<view>
|
|
|
- <view class="order-item" v-for="item,index in 10" @click="jumpUrl('/pages/orderDetail/orderDetail?id='+item)">
|
|
|
+ <view class="order-item" v-for="item,index in groupList" @click="jumpUrl('/pages/orderDetail/orderDetail?id='+item)">
|
|
|
<view class="ddflex order-item-header">
|
|
|
- <view class="order-time">2023-03-29 12:05:58</view>
|
|
|
- <block>
|
|
|
+ <view class="order-time">{{item.createDate}}</view>
|
|
|
+ <!-- <block>
|
|
|
<view v-if="index!=1" class="order-state">线下-待确认</view>
|
|
|
<view v-else class="order-state" style="color: #0FCB27;">微信-支付成功</view>
|
|
|
- </block>
|
|
|
+ </block> -->
|
|
|
</view>
|
|
|
<view class="order-item-body">
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">订单编号</view>
|
|
|
- <view class="order-item-content-data fflex tover">159582346324325171424</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.orderNo}}</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">门店名称</view>
|
|
|
- <view class="order-item-content-data fflex tover">白云科技</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.storeName}}</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">租借机柜</view>
|
|
|
- <view class="order-item-content-data fflex tover">CHZD04TTCC200329109</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.leaseDevId}}</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">电池ID</view>
|
|
|
- <view class="order-item-content-data fflex tover">613880983244</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.batteryId}}</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">电池型号</view>
|
|
|
@@ -56,23 +64,38 @@
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">租赁用户</view>
|
|
|
- <view class="order-item-content-data fflex tover">文涛 15200809658</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.realName}} {{item.phone}}</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">租借时长</view>
|
|
|
- <view class="order-item-content-data fflex tover">8小时</view>
|
|
|
+ <view class="order-item-content-data fflex tover">{{item.time}}小时</view>
|
|
|
</view>
|
|
|
<view class="order-item-content ddflex">
|
|
|
<view class="order-item-content-label">应付金额</view>
|
|
|
- <view class="order-item-content-data fflex tover" style="color: #EB5C20;">3元</view>
|
|
|
+ <view class="order-item-content-data fflex tover" style="color: #EB5C20;">{{item.payMoney}}元</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="index!=1" class="order-btns ddflex">
|
|
|
+ <!-- <view v-if="index!=1" class="order-btns ddflex">
|
|
|
<view class="order-btn" @click.stop="">确认支付</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <left-pop v-if="showPop" :showPop="showPop" :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒" width="460rpx"
|
|
|
+ @closePop="closePop()" @popSubmit="popSubmit()">
|
|
|
+ <view class="" style="height: 100%;flex-direction: column;display: flex;">
|
|
|
+ <view @click="closePop()" class="pop-title ddflex" :style="'height: '+ systems.navigationHeight + 'rpx;padding-top:' + systems.ktxStatusHeight + 'rpx;'+'line-height: '+ systems.navigationHeight + 'rpx;'">
|
|
|
+ <view>切换门店</view>
|
|
|
+ <image class="change-ssicon" src="../../static/pages/images/change.png"></image>
|
|
|
+ </view>
|
|
|
+ <scroll-view :scroll-y="true" @scrolltolower="loadLeftData" class="pop-content fflex">
|
|
|
+ <view :class="'pop-content-item '+(actMerchant.id==item.id?'pop-content-active':'')" v-for="(item,index) in merchantList" @click="changePop(item)">
|
|
|
+ <view class="pop-content-name">{{item.name}}</view>
|
|
|
+ <image class="pop-content-icon" src=""></image>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ </left-pop>
|
|
|
|
|
|
<foot channel="order" :isUpdate="isUpdate"></foot>
|
|
|
</view>
|
|
|
@@ -82,26 +105,54 @@
|
|
|
const app = getApp();
|
|
|
const req = require("../../utils/request.js");
|
|
|
import foot from "../../components/nav-bar/index";
|
|
|
+ import leftPop from "../../components/left-pop/index";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- foot
|
|
|
+ foot,
|
|
|
+ leftPop
|
|
|
},
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
systems: {},
|
|
|
- isTop: 0,
|
|
|
-
|
|
|
+ isTop:0,
|
|
|
+
|
|
|
+ showPop: false,
|
|
|
+ tempData: null,
|
|
|
+
|
|
|
queryType: 1,
|
|
|
+
|
|
|
+ groupList: [],
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
+ searchValue:'',
|
|
|
+ isQuerying:false,//正在查询数据
|
|
|
+
|
|
|
+ merchantList: [],
|
|
|
+ merchantPage: 1,
|
|
|
+ merchantLimit: 10,
|
|
|
+
|
|
|
+ actMerchant:null,//当前门店
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
-
|
|
|
+ if(req.isLogins(true)){
|
|
|
+ this.userInfo = req.getStorage('userInfo')
|
|
|
+
|
|
|
+ if(!this.userInfo.storeId){
|
|
|
+ this.getMerchantList()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.getDataList()
|
|
|
+ }
|
|
|
},
|
|
|
onShow() {
|
|
|
|
|
|
},
|
|
|
+ onReachBottom() {
|
|
|
+ this.getDataList(true)
|
|
|
+ },
|
|
|
methods: {
|
|
|
jumpUrl(url) {
|
|
|
if (req.isLogins(true)) {
|
|
|
@@ -112,7 +163,99 @@
|
|
|
},
|
|
|
queryTypeChange(val) {
|
|
|
if (this.queryType == val) return false
|
|
|
- this.queryType = val
|
|
|
+ this.queryType = val==-1?'':val
|
|
|
+ this.getDataList()
|
|
|
+ },
|
|
|
+ // 弹窗弹出
|
|
|
+ openPop(item) {
|
|
|
+ this.tempData = JSON.parse(JSON.stringify(item))
|
|
|
+ this.showPop = true
|
|
|
+ },
|
|
|
+ closePop(){
|
|
|
+ this.showPop = false
|
|
|
+ },
|
|
|
+ changePop(item){
|
|
|
+ this.actMerchant = item
|
|
|
+ this.closePop()
|
|
|
+ this.getDataList()
|
|
|
+ },
|
|
|
+ getDataList(isPage) {
|
|
|
+ if(this.isQuerying) return
|
|
|
+ else this.isQuerying = true
|
|
|
+ if (!isPage) {
|
|
|
+ this.page = 1
|
|
|
+ }
|
|
|
+ let queryParams = {
|
|
|
+ page: this.page,
|
|
|
+ limit: this.limit,
|
|
|
+ }
|
|
|
+ if(this.searchValue){
|
|
|
+ queryParams.name=this.searchValue
|
|
|
+ }
|
|
|
+ queryParams.type = this.queryType
|
|
|
+ queryParams.storeId = this.actMerchant.id
|
|
|
+ req.getRequest(
|
|
|
+ '/admin/v2/order/page',
|
|
|
+ queryParams,
|
|
|
+ data => {
|
|
|
+ if (data != null && data.list.length > 0) {
|
|
|
+ if (!isPage) {
|
|
|
+ this.groupList = data.list
|
|
|
+ } else {
|
|
|
+ this.groupList = this.groupList.concat(data.list)
|
|
|
+ }
|
|
|
+ this.page++
|
|
|
+ } else {
|
|
|
+ if (!isPage)
|
|
|
+ this.groupList = data.list
|
|
|
+ else {}
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
+ this.isQuerying = false
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ loadLeftData(res){
|
|
|
+ this.getMerchantList(true)
|
|
|
+ },
|
|
|
+ getMerchantList(isPage){
|
|
|
+ if (!isPage) {
|
|
|
+ this.merchantPage = 1
|
|
|
+ }
|
|
|
+ let queryParams = {
|
|
|
+ page: this.merchantPage,
|
|
|
+ limit: this.merchantLimit,
|
|
|
+ }
|
|
|
+ queryParams.merchantId = req.getStorage('userInfo').merchantId?req.getStorage('userInfo').merchantId:null
|
|
|
+ req.getRequest(
|
|
|
+ '/admin/v2/store/page',
|
|
|
+ queryParams,
|
|
|
+ data => {
|
|
|
+ if (data != null && data.list.length > 0) {
|
|
|
+ if (!isPage) {
|
|
|
+ this.merchantList = data.list
|
|
|
+ } else {
|
|
|
+ this.merchantList = this.merchantList.concat(data.list)
|
|
|
+ }
|
|
|
+ this.merchantPage++
|
|
|
+ } else {
|
|
|
+ if (!isPage)
|
|
|
+ this.merchantList = data.list
|
|
|
+ else {}
|
|
|
+ }
|
|
|
+ if(!isPage){
|
|
|
+ if(this.actMerchant){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.actMerchant = this.merchantList[0]
|
|
|
+ }
|
|
|
+ this.getDataList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ searchFn(){
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|