Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app

ysy 1 год назад
Родитель
Сommit
e0b19a7210

+ 1 - 3
api/saleManage/businessOpportunity/index.js

@@ -12,9 +12,7 @@ import Vue from "vue";
  * 获取信息列表
  */
 export async function getTableList(params) {
-	const res = await get(Vue.prototype.apiUrl + `/eom/businessopportunity/page`, {
-		params
-	});
+	const res = await get(Vue.prototype.apiUrl + `/eom/businessopportunity/page`, params);
 	if (res.code == 0) {
 		return res.data;
 	}

+ 1 - 3
api/saleManage/saleorder/index.js

@@ -11,9 +11,7 @@ import Vue from "vue";
  * 获取信息列表
  */
 export async function getTableList(params) {
-	const res = await get(Vue.prototype.apiUrl + `/eom/saleorder/page`, {
-		params
-	});
+	const res = await get(Vue.prototype.apiUrl + `/eom/saleorder/page`,params);
 	if (res.code == 0) {
 		return res.data;
 	}

+ 14 - 0
main.js

@@ -2,6 +2,20 @@ import App from "./App";
 
 import store from "./store";
 Vue.prototype.$store = store;
+Vue.prototype.$isAuthorities = (authorities)=>{
+	try {
+		let authoritiesLiat=uni.getStorageSync('authorities') //按钮
+		let authoritiesCode=JSON.parse(authoritiesLiat).map(item=>item.permissionCode)
+		console.log(authoritiesCode)
+		return authoritiesCode.includes(authorities)
+	} catch (error) {
+		//TODO handle the exception
+	}
+	
+	return true
+	
+	
+};
 
 // uView配置
 import uView from "@/uni_modules/uview-ui";

+ 47 - 6
pages/login/login.vue

@@ -40,11 +40,24 @@
 </template>
 
 <script>
-	import { postJ } from '@/utils/api.js'
-	import { login, usName } from '@/api/common.js'
-	import { getResourcesTree } from '@/api/pda/common.js'
+	import {
+		postJ
+	} from '@/utils/api.js'
+	import {
+		login,
+		usName
+	} from '@/api/common.js'
+	import {
+		getResourcesTree
+	} from '@/api/pda/common.js'
 
-	import { setMemo, isMemo, removeMemo, setPassword, getPassword } from '@/utils/passwordMemo.js'
+	import {
+		setMemo,
+		isMemo,
+		removeMemo,
+		setPassword,
+		getPassword
+	} from '@/utils/passwordMemo.js'
 	import ServerSetting from '@/components/ServerSetting/index'
 
 	export default {
@@ -158,7 +171,7 @@
 
 						let data = res.data
 						uni.setStorageSync('token', data.token)
-            uni.setStorageSync("userInfo", data);
+						uni.setStorageSync("userInfo", data);
 						uni.showToast({
 							title: '登录成功',
 							icon: 'success',
@@ -190,7 +203,33 @@
 					removeMemo()
 				}
 			},
+			formatRouter(list) {
+				let authorities = [];
 
+				const fn = (list) => {
+					let arr = [];
+					for (const p of list) {
+						if (p.menuType === 2) {
+							// p.children = [];
+							authorities.push(p);
+						}
+						//  else {
+						if (p.children?.length) {
+							p.children = fn(p.children);
+						} else {
+							p.children = [];
+						}
+						arr.push(p);
+						// }
+					}
+
+					return arr;
+				};
+
+				fn(list);
+
+				return authorities
+			},
 			getTree() {
 				getResourcesTree().then(res => {
 					console.log(res)
@@ -201,7 +240,9 @@
 						})
 					}
 					let List = JSON.stringify(res || [])
+					let authorities =this.formatRouter(res[0].children)
 					uni.setStorageSync('treeList', List)
+					uni.setStorageSync('authorities', JSON.stringify(authorities)) //按钮
 				})
 			}
 		}
@@ -210,4 +251,4 @@
 
 <style lang="scss" scoped>
 	@import 'login.scss';
-</style>
+</style>

+ 16 - 9
pages/saleManage/businessOpportunity/add.vue

@@ -22,17 +22,24 @@
 				</uni-data-picker>
 			</u-cell>
 			<u-cell title="赢单率" arrow-direction="down">
-				<u--input slot="value" type="number" max="100" min="0" placeholder="请输入" border="surround"
-					v-model="form.winRate">
-					<text slot="suffix">%</text>
-
-				</u--input>
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input style="flex:1"  type="number" max="100" min="0" placeholder="请输入" border="surround"
+						v-model="form.winRate">
+					
+					</u--input>
+						%
+				</view>
+			
+			
 			</u-cell>
 			<u-cell title="预算" arrow-direction="down">
-				<u--input slot="value" type="number" placeholder="请输入" border="surround" v-model="form.budget">
-					<text slot="suffix">万元</text>
-
-				</u--input>
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input style="flex:1" type="number" placeholder="请输入" border="surround" v-model="form.budget">
+					
+					</u--input>
+					万元
+				</view>
+				
 			</u-cell>
 
 			<u-cell title="预计结单日期" arrow-direction="down">

+ 19 - 12
pages/saleManage/businessOpportunity/components/drawer.vue

@@ -23,9 +23,9 @@
 			</view>
 		</view>
 
-		<u-sticky bgColor="#fff" :customNavHeight="88">
+		<!-- <u-sticky bgColor="#fff" :customNavHeight="88"> -->
 			<u-tabs :list="list1" @change="change" :current="current"></u-tabs>
-		</u-sticky>
+		<!-- </u-sticky> -->
 		<info ref="infoRef" :isDrawer="true" v-show="current==0"></info>
 
 		<produceList :pricingWay="form.pricingWay" ref="produceListRef" :isDrawer="true" v-show="current==1">
@@ -127,6 +127,7 @@
 		},
 
 		onLoad(data) {
+
 			uni.$off('setBusinessOpportunity')
 			uni.$on('setBusinessOpportunity', () => {
 				this.save()
@@ -137,10 +138,22 @@
 			})
 			uni.$off('savefollowList')
 			uni.$on('savefollowList', (item) => {
+				item.contactId=this.form.contactId
+				item.opportunityId=this.form.id
+
 				savefollowList(item)
 			})
 			getDetail(data.id).then(async res => {
 				this.form = res
+				const {
+					linkList
+				} = await contactDetail(res.contactId)
+				const followList = await getfollowList({
+					pageNum: 1,
+					size: 1000,
+					opportunityId: res.id,
+				})
+				this.linkList = linkList
 				setTimeout(() => {
 					this.current = 0
 					this.$nextTick(() => {
@@ -149,18 +162,12 @@
 						this.$refs.businessListRef.init(res.competAnalysisList)
 						this.$refs.personnelListRef.init(res.partyList)
 						this.$refs.followListRef.init(followList.list)
-
+						if (data.current) {
+							this.current = +data.current
+						}
 					})
 				}, 300)
-				const {
-					linkList
-				} = await contactDetail(res.contactId)
-				const followList = await getfollowList({
-					pageNum: 1,
-					size: 1000,
-					opportunityId: res.id,
-				})
-				this.linkList = linkList
+			
 
 
 

+ 80 - 4
pages/saleManage/businessOpportunity/index.vue

@@ -1,11 +1,28 @@
 <template>
 	<view class="mainBox">
-		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="商机" @clickLeft="back">
+		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="商机"
+			@clickLeft="back">
 		</uni-nav-bar>
+
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+
+			<button class="search_btn" @click="doSearch">搜索</button>
+
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+
+		</view>
 		<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
 			<myCard @del="del(item)" :item="item" :index="index+1" :columns="columns" :btnList="btnList"></myCard>
 
 		</view>
+		<view style='margin-top: 20vh;' v-if="tableList.length==0">
+			<u-empty iconSize='150' textSize='32' text='暂无数据'>
+			</u-empty>
+		</view>
 		<view class="add" @click="add">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
@@ -30,6 +47,7 @@
 		data() {
 			return {
 				tableList: [],
+				searchVal: '',
 				page: 1,
 				size: 10,
 				isEnd: false,
@@ -47,6 +65,20 @@
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/businessOpportunity/add',
+					judge: [{
+						// authorities: 'eom:businessopportunity:update',
+					},{
+						key: 'approvalStatus',
+						value: [0, 3],
+					
+					}],
+				}, {
+					name: '跟进记录',
+					apiName: '',
+					btnType: 'primary',
+					type: '1',
+					pageUrl: '/pages/saleManage/businessOpportunity/components/drawer',
+					query: '&current=4',
 					judge: [{
 						key: 'approvalStatus',
 						value: [0, 3]
@@ -54,10 +86,13 @@
 				}, {
 					name: '删除',
 					apiName: 'del',
+				
 					btnType: 'error ',
 					type: '2',
 					pageUrl: '',
 					judge: [{
+						// authorities: 'eom:businessopportunity:delete',
+					},{
 						key: 'approvalStatus',
 						value: [0, 3]
 					}],
@@ -120,6 +155,11 @@
 			this.getList()
 		},
 		methods: {
+			doSearch() {
+				this.isEnd = false
+				this.page = 1
+				this.getList()
+			},
 			//获取列表信息
 			getList() {
 				if (this.isEnd) {
@@ -132,7 +172,8 @@
 				let data = {
 					pageNum: this.page,
 					size: this.size,
-					type: 1
+					type: 1,
+					name: this.searchVal
 
 				}
 				getTableList(data).then(res => {
@@ -172,8 +213,6 @@
 </script>
 
 <style lang="scss" scoped>
-
-
 	.add {
 		width: 96rpx;
 		height: 96rpx;
@@ -186,4 +225,41 @@
 		align-items: center;
 		justify-content: center;
 	}
+
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 13 - 5
pages/saleManage/components/myCard.vue

@@ -12,8 +12,12 @@
 				<view class="item_one rx-sc" v-else-if="val.type=='action'">
 					<view class="lable">{{val.label}}</view>
 					<view class="text">
-						<u-button :plain="true" :hairline="true" size='mini' :type="btn.btnType" v-if="judge(btn)"
-							:text="btn.name" @click="action(btn)" v-for="(btn,bI) in btnList" :key="bI"></u-button>
+						<template v-for="(btn,bI) in btnList">
+							
+							<u-button :plain="true" :hairline="true" size='mini' :type="btn.btnType" v-if="judge(btn)"
+								:text="btn.name" @click="action(btn)"  :key="bI"></u-button>
+						</template>
+						
 					</view>
 
 				</view>
@@ -61,9 +65,13 @@
 						let is = true
 						item.judge.forEach(({
 							key,
-							value
+							value,
+							authorities
 						}) => {
-							if (!value.includes(this.item[key])) {
+							if(authorities){
+								is=this.$isAuthorities(authorities)
+							}
+							if (value&&!value.includes(this.item[key])) {
 								is = false
 							}
 						})
@@ -84,7 +92,7 @@
 			action(item) {
 				if (item.type == 1) {
 					uni.navigateTo({
-						url: item.pageUrl + '?id=' + this.item.id
+						url: item.pageUrl + '?id=' + this.item.id+(item.query||'')
 					})
 				} else {
 					this.$emit(item.apiName)

+ 92 - 10
pages/saleManage/contact/adminIndex.vue

@@ -1,7 +1,24 @@
 <template>
 	<view class="mainBox">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" background-color="#157A2C" color="#fff"  title="公海客户" @clickLeft="back">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="公海客户" @clickLeft="back">
+			<!--右菜单-->
+			<template slot="right">
+				<u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()"
+					text="选择分类"></u-button>
+			</template>
 		</uni-nav-bar>
+
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+		
+			<button class="search_btn" @click="doSearch">搜索</button>
+		
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+		
+		</view>
 		<u-list @scrolltolower="scrolltolower">
 			<contactList :btnList="btnList" ref="contactListRef"></contactList>
 
@@ -9,16 +26,21 @@
 		<view class="add" @click="add">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
-
+		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
+			:localdata="classificationList" valueKey="id" textKey="name" />
 	</view>
 </template>
 
 <script>
 	import contactList from './contactList.vue'
-
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	import {
+		getTreeByPid,
+	} from '@/api/classifyManage'
 	export default {
 		components: {
-			contactList
+			contactList,
+			baTreePicker
 		},
 		data() {
 			return {
@@ -34,13 +56,13 @@
 						key: 'assignStatus',
 						value: [0]
 					}],
-				},{
+				}, {
 					name: '详情',
 					apiName: '',
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/components/drawer'
-				},{
+				}, {
 					name: '释放',
 					apiName: 'setFree',
 					btnType: 'warning ',
@@ -70,19 +92,40 @@
 						key: 'assignStatus',
 						value: [0]
 					}],
-				}]
+				}],
+				searchVal: '',
+				categoryLevelId: '',
+				classificationList:[]
 			}
 		},
 
 		async onLoad() {
+			getTreeByPid(17).then(res => {
+				this.classificationList = res.data
+			
+			});
 			this.$nextTick(() => {
 				this.$refs.contactListRef.getList({
-					type: 1
+					type: 1,
+					
 				})
 			})
 		},
-
+	
 		methods: {
+			doSearch(){
+				this.$nextTick(() => {
+					this.$refs.contactListRef.doSearch({
+						type: 1,
+						name: this.searchVal,
+						categoryId: this.categoryLevelId,
+					})
+				})
+			},
+			confirm([id]) {
+				this.categoryLevelId = id
+				this.doSearch()
+			},
 			add() {
 				uni.navigateTo({
 					url: '/pages/saleManage/contact/add'
@@ -90,7 +133,9 @@
 			},
 			scrolltolower() {
 				this.$refs.contactListRef.getList({
-					type: 1
+					type: 1,
+					name: this.searchVal,
+					categoryId: this.categoryLevelId,
 				})
 			},
 		}
@@ -110,4 +155,41 @@
 		align-items: center;
 		justify-content: center;
 	}
+
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+	
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+	
+		/deep/.uni-section-header {
+			padding: 0px;
+	
+		}
+	
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+	
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 2 - 2
pages/saleManage/contact/components/drawer.vue

@@ -32,9 +32,9 @@
 			</view>
 		</view>
 
-		<u-sticky bgColor="#fff" :customNavHeight="88">
+		<!-- <u-sticky bgColor="#fff" :customNavHeight="88"> -->
 			<u-tabs :list="list1" @change="change" :current="current"></u-tabs>
-		</u-sticky>
+		<!-- </u-sticky> -->
 		<comment ref="commentRef" :isDrawer="true" v-show="current==1"></comment>
 		<info ref="infoRef" :isDrawer="true" v-show="current==0"></info>
 

+ 2 - 3
pages/saleManage/contact/components/followListAdd.vue

@@ -54,7 +54,7 @@
 					agreement: '',
 					contactId: '',
 					content: '',
-					followupTime: '',
+					followupTime:'',
 					linkId: '',
 					linkName: '',
 					nextPlan: '',
@@ -79,7 +79,6 @@
 					id:item.id
 				}
 			})
-			console.log(this.linkList)
 			const business_stage_code = await getByCode('business_stage_code');
 			this.business_stage_code = business_stage_code.map(item => {
 				const key = Object.keys(item)[0]
@@ -92,7 +91,7 @@
 		methods: {
 			//监听选择(ids为数组)
 			selectChange(data = []) {
-				this.form.linkId = data.map(item => item.id)
+				this.form.linkId = data.map(item => item.id).toString()
 				this.form.linkName = data.map(item => item.name).toString()
 				this.categoryIdList = data
 			},

+ 14 - 5
pages/saleManage/contact/contactList.vue

@@ -1,12 +1,15 @@
 <template>
 	<view class="mainBox">
 		<u-list-item v-for="(item, index) in tableList" :key="index" style="position: relative;">
-			<myCard @setFree="setFree(item)" @addApply="addApply(item)" @assignModelShow="assignModelShow(item)" @del="del(item)" :item="item"
-				:index="index+1" :btnList="btnList" :columns="columns"> </myCard>
+			<myCard @setFree="setFree(item)" @addApply="addApply(item)" @assignModelShow="assignModelShow(item)"
+				@del="del(item)" :item="item" :index="index+1" :btnList="btnList" :columns="columns"> </myCard>
 
 
 		</u-list-item>
-
+<view style='margin-top: 20vh;' v-if="tableList.length==0">
+			<u-empty iconSize='150' textSize='32' text='暂无数据'>
+			</u-empty>
+		</view>
 		<u-modal :show="modalShow" @cancel="modalShow=false" :showCancelButton="true" :closeOnClickOverlay="true"
 			@confirm="assign" :title="'指派'">
 			<view>
@@ -37,7 +40,8 @@
 		contactPage,
 		contactDelete,
 		free,
-		assign,apply
+		assign,
+		apply
 	} from '@/api/saleManage/contact/index.js'
 	import {
 		listOrganizations,
@@ -222,11 +226,16 @@
 						this.getList(this.where)
 					})
 			},
+			doSearch(where) {
+				this.page = 1
+				this.isEnd = false
+				this.getList(where)
+			},
 			//申请
 			addApply(row) {
 				apply({
 					contactIds: row.id,
-					contactNames:row.name
+					contactNames: row.name
 				}).then((res) => {
 					this.isEnd = false
 					this.page = 1

+ 92 - 7
pages/saleManage/contact/index.vue

@@ -1,7 +1,26 @@
 <template>
 	<view class="mainBox">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" background-color="#157A2C" color="#fff" title="公海客户" @clickLeft="back">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="公海客户" @clickLeft="back">
+			<!--右菜单-->
+			<template slot="right">
+				<u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()"
+					text="选择分类"></u-button>
+			</template>
 		</uni-nav-bar>
+
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+
+			<button class="search_btn" @click="doSearch">搜索</button>
+
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+
+
+
+		</view>
 		<u-list @scrolltolower="scrolltolower">
 			<contactList :btnList="btnList" ref="contactListRef"></contactList>
 
@@ -9,16 +28,22 @@
 		<view class="add" @click="add">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
-
+<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
+			:localdata="classificationList" valueKey="id" textKey="name" />
 	</view>
 </template>
 
 <script>
 	import contactList from './contactList.vue'
 
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	import {
+		getTreeByPid,
+	} from '@/api/classifyManage'
 	export default {
 		components: {
-			contactList
+			contactList,
+			baTreePicker
 		},
 		data() {
 			return {
@@ -30,24 +55,46 @@
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/add'
-				},{
+				}, {
 					name: '申请',
 					apiName: 'addApply',
 					btnType: 'primary',
 					type: '2',
-				}]
+				}],
+				searchVal: '',
+				categoryLevelId: '',
+				classificationList:[]
 			}
 		},
 
 		async onLoad() {
+			getTreeByPid(17).then(res => {
+				this.classificationList = res.data
+			
+			});
 			this.$nextTick(() => {
 				this.$refs.contactListRef.getList({
-					type: 1
+					type: 1,
+					assignStatus: 0,
 				})
 			})
 		},
 
 		methods: {
+			doSearch(){
+				this.$nextTick(() => {
+					this.$refs.contactListRef.doSearch({
+						type: 1,
+						name: this.searchVal,
+						categoryId: this.categoryLevelId,
+						assignStatus: 0,
+					})
+				})
+			},
+			confirm([id]) {
+				this.categoryLevelId = id
+				this.doSearch()
+			},
 			add() {
 				uni.navigateTo({
 					url: '/pages/saleManage/contact/add'
@@ -56,7 +103,9 @@
 			scrolltolower() {
 				this.$refs.contactListRef.getList({
 					type: 1,
-					assignStatus:0
+					assignStatus: 0,
+					name: this.searchVal,
+					categoryId: this.categoryLevelId,
 				})
 			},
 		}
@@ -76,4 +125,40 @@
 		align-items: center;
 		justify-content: center;
 	}
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+	
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+	
+		/deep/.uni-section-header {
+			padding: 0px;
+	
+		}
+	
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+	
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 93 - 9
pages/saleManage/contact/myList.vue

@@ -1,19 +1,44 @@
 <template>
 	<view class="mainBox">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" background-color="#157A2C" color="#fff" title="我的客户" @clickLeft="back">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="我的客户" @clickLeft="back">
+			<!--右菜单-->
+			<template slot="right">
+				<u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()"
+					text="选择分类"></u-button>
+			</template>
 		</uni-nav-bar>
+		
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+		
+			<button class="search_btn" @click="doSearch">搜索</button>
+		
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+		
+		
+		
+		</view>
 		<u-list @scrolltolower="scrolltolower">
 			<contactList :btnList="btnList" ref="contactListRef"></contactList>
 		</u-list>
+		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
+			:localdata="classificationList" valueKey="id" textKey="name" />
 	</view>
 </template>
 
 <script>
 	import contactList from './contactList.vue'
-
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	import {
+		getTreeByPid,
+	} from '@/api/classifyManage'
 	export default {
 		components: {
-			contactList
+			contactList,
+			baTreePicker
 		},
 		data() {
 			return {
@@ -25,33 +50,56 @@
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/add'
-				},{
+				}, {
 					name: '详情',
 					apiName: '',
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/components/drawer'
-				}]
+				}],
+				searchVal: '',
+				categoryLevelId: '',
+				classificationList: []
 			}
 		},
 
-		async onShow() {
-			// alert(1)
+		async onLoad() {
+			getTreeByPid(17).then(res => {
+				this.classificationList = res.data
+
+			});
 			this.userInfo = uni.getStorageSync('userInfo')
 			this.$nextTick(() => {
 				this.$refs.contactListRef.getList({
 					type: 1,
 					salesmanId: this.userInfo.userId,
+					name: this.searchVal,
+					categoryId: this.categoryLevelId,
 				})
 			})
 		},
 
 		methods: {
-
+			doSearch() {
+				this.$nextTick(() => {
+					this.$refs.contactListRef.doSearch({
+						type: 1,
+						salesmanId: this.userInfo.userId,
+						name: this.searchVal,
+						categoryId: this.categoryLevelId,
+					})
+				})
+			},
+			confirm([id]) {
+				this.categoryLevelId = id
+				this.doSearch()
+			},
 			scrolltolower() {
 				this.$refs.contactListRef.getList({
 					type: 1,
-					salesmanId: this.userInfo.userId
+					salesmanId: this.userInfo.userId,
+					name: this.searchVal,
+					categoryId: this.categoryLevelId,
 				})
 			},
 		}
@@ -71,4 +119,40 @@
 		align-items: center;
 		justify-content: center;
 	}
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+	
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+	
+		/deep/.uni-section-header {
+			padding: 0px;
+	
+		}
+	
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+	
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 2 - 2
pages/saleManage/saleOrder/components/drawer.vue

@@ -37,9 +37,9 @@
 			</view>
 		</view>
 
-		<u-sticky bgColor="#fff" :customNavHeight="88">
+		<!-- <u-sticky bgColor="#fff" :customNavHeight="88"> -->
 			<u-tabs :list="list1" @change="change" :current="current"></u-tabs>
-		</u-sticky>
+		<!-- </u-sticky> -->
 		<info ref="infoRef" :isDrawer="true" v-show="current==0"></info>
 		<produceList v-show="current==1" ref="produceListRef" :pricingWay="form.pricingWay"
 			:contractId="form.contractId" :columns="produceLisTcolumns">

+ 59 - 2
pages/saleManage/saleOrder/index.vue

@@ -2,12 +2,27 @@
 	<view class="mainBox">
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="订单" @clickLeft="back">
 		</uni-nav-bar>
+		
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="客户名称">
+				</uni-easyinput>
+			</uni-section>
+		
+			<button class="search_btn" @click="doSearch">搜索</button>
+		
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+		
+		</view>
 		<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
 			<myCard  :item="item" :index="index+1" :btnList="btnList" :columns="columns"
 				@del="del(item)"></myCard>
 
 		</view>
-
+<view style='margin-top: 20vh;' v-if="tableList.length==0">
+			<u-empty iconSize='150' textSize='32' text='暂无数据'>
+			</u-empty>
+		</view>
 		<view class="add" @click="add">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
@@ -117,7 +132,7 @@
 				page: 1,
 				size: 10,
 				isEnd: false,
-
+				searchVal:''
 				//报价管理-审核枚举
 
 			}
@@ -132,6 +147,11 @@
 			this.getList()
 		},
 		methods: {
+			doSearch() {
+				this.isEnd = false
+				this.page = 1
+				this.getList()
+			},
 			//获取列表信息
 			getList() {
 				if (this.isEnd) {
@@ -144,6 +164,7 @@
 				let data = {
 					pageNum: this.page,
 					size: this.size,
+					partaName:this.partaName
 				}
 				getTableList(data).then(res => {
 					if (this.page === 1) {
@@ -191,4 +212,40 @@
 		align-items: center;
 		justify-content: center;
 	}
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>