2213980799@qq.com 1 jaar geleden
bovenliggende
commit
5a633df920

+ 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;
 	}

+ 4 - 1
pages/saleManage/businessOpportunity/components/drawer.vue

@@ -127,6 +127,7 @@
 		},
 
 		onLoad(data) {
+
 			uni.$off('setBusinessOpportunity')
 			uni.$on('setBusinessOpportunity', () => {
 				this.save()
@@ -149,7 +150,9 @@
 						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 {

+ 74 - 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,
@@ -51,6 +69,17 @@
 						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]
+					}],
 				}, {
 					name: '删除',
 					apiName: 'del',
@@ -120,6 +149,11 @@
 			this.getList()
 		},
 		methods: {
+			doSearch() {
+				this.isEnd = false
+				this.page = 1
+				this.getList()
+			},
 			//获取列表信息
 			getList() {
 				if (this.isEnd) {
@@ -132,7 +166,8 @@
 				let data = {
 					pageNum: this.page,
 					size: this.size,
-					type: 1
+					type: 1,
+					name: this.searchVal
 
 				}
 				getTableList(data).then(res => {
@@ -172,8 +207,6 @@
 </script>
 
 <style lang="scss" scoped>
-
-
 	.add {
 		width: 96rpx;
 		height: 96rpx;
@@ -186,4 +219,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>

+ 1 - 1
pages/saleManage/components/myCard.vue

@@ -84,7 +84,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>

+ 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>

+ 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>