From e6a02c8b09a796e436a501e9b87d19e25c34c9d1 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期日, 07 四月 2024 15:53:37 +0800
Subject: [PATCH] #
---
pages/business/saleManage/saleManage.vue | 194 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 164 insertions(+), 30 deletions(-)
diff --git a/pages/business/saleManage/saleManage.vue b/pages/business/saleManage/saleManage.vue
index fa9ef39..d821256 100644
--- a/pages/business/saleManage/saleManage.vue
+++ b/pages/business/saleManage/saleManage.vue
@@ -1,34 +1,100 @@
<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" />
+ <u-search placeholder="杈撳叆" v-model="keyword" :clearabled="true" @custom="search()" @search="search()"></u-search>
</view>
<view>
<!-- 瀹㈡埛鍒楄〃 -->
- <view class="c-list" @click="getDetails(item.id)" v-for="(item,index) in csmtrList" :key="index">
- <view class="titles">
- <y-title :title="item.name"></y-title>
+ <view class="c-list" v-for="(item,index) in csmtrList" :key="index">
+ <view class="titles" @click="getDetails(item.id)">
+ <view style="flex: 1;">
+ <y-title :title="item.name"></y-title>
+ </view>
+ <uni-icons class="opt-icon" type="right" size="20" color="#b9b9b9"></uni-icons>
</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="cstmrs">
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰鍙�</view><view class="list-item2">{{item.id}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">璺熻釜椤圭洰鍚嶇О</view><view class="list-item2">{{item.name}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰浠e彿</view><view class="list-item2">{{item.uuid}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">鐢叉柟鍗曚綅</view><view class="list-item2 color-main" @click="goDetls(item.cstmrId)">{{item.cstmrId$ ? item.cstmrId$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">鎵�灞炲尯鍩�</view><view class="list-item2">{{item.pcd$ ? item.pcd$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰鍦板潃</view><view class="list-item2">{{item.addr ? item.addr : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰棰勭畻閲戦(涓�)</view><view class="list-item2">{{item.money ? item.money : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰棰勪及鎴愪氦鐜�</view><view class="list-item2">{{item.transactionRate ? item.transactionRate : '--'}}%</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">椤圭洰璐熻矗浜�</view><view class="list-item2">{{item.userId$ ? item.userId$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">澶囨敞</view><view class="list-item2">{{item.memo ? item.memo : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">娣诲姞鏃堕棿</view><view class="list-item2">{{item.createTime$ ? item.createTime$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">鎵�灞炲叕鍙�</view><view class="list-item2">{{item.company$ ? item.company$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">浜у搧绫诲瀷</view><view class="list-item2">{{item.orderProductTypeId$ ? item.orderProductTypeId$ : '--'}}</view>
+ </view>
+ <view class="cstmrs-item">
+ <view class="list-item1">鐘舵��</view><view class="list-item2">{{item.status$ ? item.status$ : '--'}}</view>
+ </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 style="height: 10rpx;"></view>
+ <view class="fxbtn">
+ <uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons>
+ </view>
</view>
</template>
<script>
+ import user from '@/pages/api/user/user.js'
export default {
data() {
return {
+ keyword: '',
+ user: {
+ username: '',
+ id: 0,
+ type: ''
+ },
+ falg: true,
csmtrList: [],
last_id: '',
reload: false,
@@ -42,33 +108,59 @@
}
},
- // 鏂板缓鎸夐挳浜嬩欢
- onNavigationBarButtonTap(e) {
- uni.navigateTo({
- url:'/pages/business/saleManage/addSaleManage',
- })
-
- },
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: {
+ 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)
+ }
+ },
+ add() {
+ uni.navigateTo({
+ url:'/pages/business/saleManage/addSaleManage',
+ })
+ },
getCsmtr1(e) {
let that = this
that.csmtrList = []
+ uni.showLoading({})
+ let param = {curr:1,limit:4,dept_id: 0,user_id: 67}
+ if (this.user.type == 'user_id') {
+ param = {curr:1,limit:4,user_id: that.user.id}
+ } else if(this.user.type == 'dept_id') {
+ param = {curr:1,limit:4,dept_id: that.user.id}
+ } else {
+ param = {curr:1,limit:4}
+ }
uni.request({
- url: that.baseUrl + '/cstmr/page/auth',
+ url: that.baseUrl + '/order/page/auth',
header: {'token' : uni.getStorageSync('token'),},
- data: {curr:1,limit:4},
+ data: param,
method:'GET',
success(result) {
if (result.statusCode === 404) {
@@ -101,14 +193,26 @@
});
}, 1000);
},
+ complete() {
+ uni.hideLoading()
+ }
})
},
getCsmtr() {
let that = this
+ uni.showLoading({})
+ let param = {curr:that.curr,limit:4,dept_id: 0,user_id: 67}
+ if (this.user.type == 'user_id') {
+ param = {curr:that.curr,limit:4,user_id: that.user.id}
+ } else if(this.user.type == 'dept_id') {
+ param = {curr:that.curr,limit:4,dept_id: that.user.id}
+ } else {
+ param = {curr:that.curr,limit:4}
+ }
uni.request({
- url: that.baseUrl + '/cstmr/page/auth',
+ url: that.baseUrl + '/order/page/auth',
header: {'token' : uni.getStorageSync('token'),},
- data: {curr:that.curr,limit:4},
+ data: param,
method:'GET',
success(result) {
if (result.statusCode === 404) {
@@ -142,17 +246,34 @@
});
}, 1000);
},
+ complete() {
+ uni.hideLoading()
+ }
})
},
getDetails(id) {
uni.navigateTo({
- url: '/pages/business/cstmr/cstmrDetails?id=' + id
+ url: '/pages/business/saleManage/saleManageDetails?id=' + id
+ })
+ },
+ goDetls(id) {
+ uni.navigateTo({
+ url: '/pages/business/saleManage/cstmrDetls?id=' + id
})
},
// ---
search() {
- }
+ },
+ back() {
+ uni.navigateBack({
+ })
+ },
+ scan() {
+ uni.navigateTo({
+ url: '/pages/authority/authority'
+ })
+ },
}
}
</script>
@@ -173,14 +294,15 @@
margin-bottom: 20px;
}
.list-item1 {
-
- height: 45rpx;
+ flex: 1;
+ min-height: 45rpx;
line-height: 45rpx;
color: #909399;
text-indent: 30rpx;
}
.list-item2 {
- height: 45rpx;
+ flex: 3;
+ min-height: 45rpx;
line-height: 45rpx;
color: black;
}
@@ -188,6 +310,18 @@
padding-left: 10rpx;
text-indent: 5rpx;
margin-top: 10rpx;
+ display: flex;
+ }
+ .cstmrs {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ }
+ .cstmrs-item {
+ display: flex;
+ }
+ .color-main {
+ color: #55aaff
}
/* .title {
height: 60rpx;
--
Gitblit v1.9.1