From 35982df874cdaa7149dc246d88cff0cb6929affe Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 07 十一月 2023 16:27:24 +0800
Subject: [PATCH] #
---
pages/business/plan/plan.vue | 117 +++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 82 insertions(+), 35 deletions(-)
diff --git a/pages/business/plan/plan.vue b/pages/business/plan/plan.vue
index 703dd23..1fb4446 100644
--- a/pages/business/plan/plan.vue
+++ b/pages/business/plan/plan.vue
@@ -1,6 +1,21 @@
<template>
<view>
<!-- 鎼滅储妗� -->
+ <view class="status_bar">
+ <!-- 杩欓噷鏄姸鎬佹爮 -->
+ </view>
+ <uni-nav-bar left-icon="left" title="瑙勫垝鐢宠鍗�" @clickLeft="back" @clickRight="scan" :fixed="true"
+ :border="false" rightWidth="160rpx" leftWidth="160rpx"
+ >
+ <block slot="right">
+ <view class="city">
+ <view>
+ <text class="uni-nav-bar-text">{{user.username}}</text>
+ </view>
+ <uni-icons type="arrowdown" color="#333333" size="20" />
+ </view>
+ </block>
+ </uni-nav-bar>
<view class="search-bg">
<uni-search-bar placeholder="瀹㈡埛浠e彿/鍚嶇О" bgColor="#f4f4f4" @confirm="search" />
</view>
@@ -11,17 +26,19 @@
<y-title :title="item.name"></y-title>
</view>
<view style="display: grid;grid-template-columns: 1fr 3fr;">
- <view class="list-item1">瀹㈡埛浠e彿</view><view class="list-item2">{{item.uuid}}</view>
- <view class="list-item1">璇︾粏鍦板潃</view><view class="list-item2">{{item.addr}}</view>
- <view class="list-item1">鐢佃瘽</view><view class="list-item2">{{item.tel}}</view>
- <view class="list-item1">澶囨敞</view><view class="list-item2">{{item.remarks ? item.remarks : '--'}}</view>
- <view class="list-item1">瀹㈡埛绫诲埆</view><view class="list-item2">{{item.cstmrType$}}</view>
- <view class="list-item1">鍒涘缓浜�</view><view class="list-item2">{{item.createBy$}}</view>
- <view class="list-item1">鍒涘缓鏃堕棿</view><view class="list-item2">{{item.createTime$}}</view>
+ <view class="list-item1">涓氬姟鍛�</view><view class="list-item2">{{item.userId$}}</view>
+ <view class="list-item1">涓氬姟绫诲瀷</view><view class="list-item2">{{item.planType$}}</view>
+ <view class="list-item1">瑙勫垝鍗曞彿</view><view class="list-item2">{{item.uuid}}</view>
+ <view class="list-item1">鎵�闇�</view><view class="list-item2">{{item.planNeed$}}</view>
+ <view class="list-item1">瑙勫垝鍛�</view><view class="list-item2">{{item.planner$}}</view>
+ <view class="list-item1">璺熻釜椤圭洰</view><view class="list-item2 color-main">{{item.cstmrId$}}</view>
+ <view class="list-item1">杩涘害</view><view class="list-item2">{{item.settle$}}</view>
+ <view class="list-item1">娣诲姞鏃ユ湡</view><view class="list-item2">{{item.createTime$}}</view>
</view>
</view>
</view>
- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
+ <!-- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" /> -->
+ <u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="csmtrList.length <= 0" />
<view>
<!-- 鏅�氬脊绐� -->
<uni-popup ref="popup" background-color="#fff">
@@ -32,13 +49,24 @@
</view>
</uni-popup>
</view>
+
+ <view class="fxbtn">
+ <uni-icons type="plusempty" color="#fff" @click="gotoggle()" ></uni-icons>
+ </view>
</view>
</template>
<script>
+ import user from '@/pages/api/user/user.js'
export default {
data() {
return {
+ user: {
+ username: '',
+ id: 0,
+ type: ''
+ },
+ falg: true,
csmtrList: [],
last_id: '',
reload: false,
@@ -78,43 +106,49 @@
]
}
},
- // 鏂板缓鎸夐挳浜嬩欢
- onNavigationBarButtonTap(e) {
- this.toggle('right')
- // uni.navigateTo({
- // url:'/pages/business/cstmr/addCsmtr',
- // })
-
- },
onLoad() {
},
onShow() {
+ let that = this
+ uni.$on('isRefresh',function(data){
+ that.user.username = data.title
+ that.user.id = data.id
+ that.user.type = data.key
+ that.falg = false
+ })
+ if (this.falg) {
+ this.getDetail()
+ }
setTimeout(()=> {
this.getCsmtr1()
- },500)
+ },50)
},
onReachBottom() {
this.status = 'more';
this.getCsmtr()
},
methods: {
- add(val) {
- switch (val) {
- case 1:
- uni.navigateTo({
- url:'/pages/business/plan/addPlan',
- })
- break;
- case 2:
- uni.navigateTo({
- url:'/pages/business/plan/addPlan2',
- })
- break;
- default:
- console.log(val);
- break;
+ async getDetail() {
+ let res = await user.getDetail()
+ if (res.code === 200) {
+ this.user.username = res.data.username
+ this.user.id = res.data.id
+ } else if (res.code === 403) {
+ this.backLogin(res)
}
+ },
+ gotoggle() {
+ this.toggle('right')
+ },
+ add(val) {
+ let addPlan = 'addPlan'
+ if (val > 1) {
+ addPlan = 'addPlan' + val
+ }
+ uni.navigateTo({
+ url:'/pages/business/plan/' + addPlan,
+ })
},
toggle(type) {
this.type = type
@@ -165,7 +199,7 @@
getCsmtr() {
let that = this
uni.request({
- url: that.baseUrl + '/cstmr/page/auth',
+ url: that.baseUrl + '/plan/page/auth',
header: {'token' : uni.getStorageSync('token'),},
data: {curr:that.curr,limit:4},
method:'GET',
@@ -205,13 +239,22 @@
},
getDetails(id) {
uni.navigateTo({
- url: '/pages/business/cstmr/cstmrDetails?id=' + id
+ url: '/pages/business/plan/planDetails?id=' + id
})
},
// ---
search() {
- }
+ },
+ back() {
+ uni.navigateBack({
+ })
+ },
+ scan() {
+ uni.navigateTo({
+ url: '/pages/authority/authority'
+ })
+ },
}
}
</script>
@@ -224,6 +267,7 @@
margin-top: 20px;
}
.popup-content {
+ margin-top: 150rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -259,6 +303,9 @@
line-height: 45rpx;
color: black;
}
+ .color-main {
+ color: #55aaff
+ }
.titles {
padding-left: 10rpx;
text-indent: 5rpx;
--
Gitblit v1.9.1