2213980799@qq.com преди 1 година
родител
ревизия
9a0e45c259

+ 11 - 0
api/saleManage/saleorder/index.js

@@ -86,3 +86,14 @@ export async function deleteInformation(data) {
 	return Promise.reject(new Error(res.message));
 }
 
+/**
+ * 查询项目列表
+ * @data data
+ */
+export async function projectsPageAPI(data) {
+    const res = await postJ(Vue.prototype.apiUrl+'/pro/projects/page', data);
+    if (res.code == 0) {
+        return res.data;
+    }
+    return Promise.reject(new Error(res.message));
+}

+ 24 - 0
pages.json

@@ -1935,6 +1935,22 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		{
+			"path": "pages/saleManage/businessOpportunity/followList",
+			"style": {
+				"navigationBarTitleText": "商机跟进记录",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		{
+			"path": "pages/saleManage/contact/followList",
+			"style": {
+				"navigationBarTitleText": "客户跟进记录",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
 		{
 			"path": "pages/saleManage/components/selectContact",
 			"style": {
@@ -2012,6 +2028,14 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
+		},
+		{
+			"path": "pages/saleManage/components/selectProject",
+			"style": {
+				"navigationBarTitleText": "选择项目",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
 		}
 	],
 	"tabBar": {

+ 17 - 14
pages/saleManage/businessOpportunity/add.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="mainBox">
-		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" :title="this.form.id?'修改商机':'新建商机'"
-			@clickLeft="back">
+		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back"
+			:title="this.form.id?'修改商机':'新建商机'" @clickLeft="back">
 		</uni-nav-bar>
 		<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
 		<u-cell-group v-show='current==0'>
@@ -23,23 +23,23 @@
 			</u-cell>
 			<u-cell title="赢单率" arrow-direction="down">
 				<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"
+					<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">
 				<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">
@@ -122,7 +122,7 @@
 				},
 				business_opport_code: [],
 				linkList: [],
-	
+
 
 			}
 		},
@@ -200,10 +200,10 @@
 
 			radioChange(e) {
 				this.form.pricingWay = e.detail.value
-				this.$nextTick(()=>{
+				this.$nextTick(() => {
 					this.$refs.produceListRef.getTotalPrice()
 				})
-			     
+
 
 			},
 			sectionChange(index) {
@@ -237,8 +237,10 @@
 					}
 
 					if (this.$refs.produceListRef.getValue().length == 0) {
-						this.$message.warning('产品清单不能为空');
-
+						this.$refs.uToast.show({
+							type: "error",
+							message: "产品清单不能为空",
+						})
 						return;
 					}
 
@@ -292,6 +294,7 @@
 		/deep/.u-button {
 			height: 100%;
 		}
+
 		>view {
 			flex: 1;
 

+ 6 - 0
pages/saleManage/businessOpportunity/components/businessList.vue

@@ -47,12 +47,18 @@
 						prop: 'name',
 						slot: 'name',
 						className: 'perce100',
+						style:{
+							marginBottom:'14rpx'
+						}
 					}],
 					[{
 						label: '竞品分析:',
 						prop: 'analysis',
 						slot: 'analysis',
 						className: 'perce100',
+						style:{
+							marginBottom:'14rpx'
+						}
 					}],
 					[{
 						label: '操作:',

+ 3 - 3
pages/saleManage/businessOpportunity/components/drawer.vue

@@ -9,15 +9,15 @@
 
 				<view>
 					<view class="lable">预算</view>
-					<view>{{form.budget}} 万元</view>
+					<view>{{form.budget||''}} 万元</view>
 				</view>
 				<view>
 					<view class="lable">赢单率</view>
-					<view>{{form.winRate}} %</view>
+					<view>{{form.winRate||''}} %</view>
 				</view>
 				<view>
 					<view class="lable">预计结单日期</view>
-					<view>{{form.expectedClosingDate}}</view>
+					<view>{{form.expectedClosingDate||''}}</view>
 				</view>
 
 			</view>

+ 19 - 1
pages/saleManage/businessOpportunity/components/personnelList.vue

@@ -56,31 +56,48 @@
 						label: '姓名:',
 						prop: 'linkId',
 						slot: 'linkId',
-
+						style: {
+							marginBottom: '10rpx'
+						}
 					}, {
 						label: '职位:',
 						prop: 'linkPost',
+						style: {
+							marginBottom: '10rpx'
+						}
 					}],
 					[{
 						label: '联系方式:',
 						prop: 'linkMobilePhone',
+						style: {
+							marginBottom: '10rpx'
+						}
 
 					}],
 					[{
 						label: '影响力:',
 						prop: 'influenceCode',
 						slot: 'influenceCode',
+						style: {
+							marginBottom: '10rpx'
+						}
 
 					}, {
 						label: '态度:',
 						prop: 'attitudeCode',
 						slot: 'attitudeCode',
+						style: {
+							marginBottom: '10rpx'
+						}
 					}],
 					[{
 						label: '项目目标/期望:',
 						prop: 'goal',
 						slot: 'goal',
 						className: 'perce100',
+						style: {
+							marginBottom: '10rpx'
+						}
 					}],
 					[{
 						label: '操作:',
@@ -202,6 +219,7 @@
 		/deep/.u-button {
 			height: 100%;
 		}
+
 		>view {
 			flex: 1;
 

+ 126 - 0
pages/saleManage/businessOpportunity/followList.vue

@@ -0,0 +1,126 @@
+<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>
+
+		<followList ref="followListRef" :linkList="linkList" pageName="businessOpportunity">
+		</followList>
+	
+	</view>
+</template>
+
+<script>
+	import followList from "@/pages/saleManage/contact/components/followList.vue"
+	import {
+		contactDetail,
+	} from '@/api/saleManage/contact/index.js'
+	import {
+		getfollowList,
+		savefollowList,
+		getDetail
+	} from '@/api/saleManage/businessOpportunity/index.js'
+	export default {
+		components: {
+			followList,
+		},
+
+		data() {
+			return {
+				linkList: []
+			}
+		},
+		computed: {
+
+		},
+
+
+		onLoad(data) {
+			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
+				this.$nextTick(() => {
+					this.$refs.followListRef.init(followList.list)
+
+				})
+
+
+
+
+			})
+		},
+		onUnload() {
+			uni.$off('savefollowList')
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.add {
+		width: 96rpx;
+		height: 96rpx;
+		border-radius: 48rpx;
+		background: #3c9cff;
+		position: fixed;
+		bottom: 100rpx;
+		right: 24rpx;
+		display: flex;
+		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>

+ 6 - 9
pages/saleManage/businessOpportunity/index.vue

@@ -66,23 +66,19 @@
 					type: '1',
 					pageUrl: '/pages/saleManage/businessOpportunity/add',
 					judge: [{
-						// authorities: 'eom:businessopportunity:update',
+						authorities: 'eom:businessopportunity:update',
 					},{
 						key: 'approvalStatus',
 						value: [0, 3],
 					
 					}],
 				}, {
-					name: '跟进记录',
+					name: '跟进',
 					apiName: '',
 					btnType: 'primary',
 					type: '1',
-					pageUrl: '/pages/saleManage/businessOpportunity/components/drawer',
-					query: '&current=4',
-					judge: [{
-						key: 'approvalStatus',
-						value: [0, 3]
-					}],
+					pageUrl: '/pages/saleManage/businessOpportunity/followList',
+					judge: [],
 				}, {
 					name: '删除',
 					apiName: 'del',
@@ -91,7 +87,7 @@
 					type: '2',
 					pageUrl: '',
 					judge: [{
-						// authorities: 'eom:businessopportunity:delete',
+						authorities: 'eom:businessopportunity:delete',
 					},{
 						key: 'approvalStatus',
 						value: [0, 3]
@@ -154,6 +150,7 @@
 			this.page = 1
 			this.getList()
 		},
+		
 		methods: {
 			doSearch() {
 				this.isEnd = false

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

@@ -3,8 +3,8 @@
 	<view class="card_box">
 
 
-		<view class="item_box rx-bc" v-for="(_item,i) in columns" :key="i">
-			<view class="perce50" :class="val.className" v-for="(val) in _item" :key="val.prop">
+		<view class="item_box rx-bc" v-for="(_item,i) in columns" :key="i" >
+			<view class="perce50" :class="val.className" :style="val.style" v-for="(val) in _item" :key="val.prop">
 				<view class="item_box rx-sc" v-if="val.type=='title'">
 					<view class="round" v-if='index'>{{index}}</view>
 					<view class="orderId" :style="{marginLeft: index?'16rpx':''}">{{item[val.prop]||''}} </view>
@@ -202,7 +202,7 @@
 
 	/deep/.u-input {
 		padding: 0 !important;
-		height: 38rpx !important;
+		height: 44rpx !important;
 		font-size: 26rpx !important;
 	}
 
@@ -217,13 +217,13 @@
 	/deep/.uni-date__x-input,
 	/deep/.uni-date-x {
 		padding: 0 !important;
-		height: 38rpx !important;
+		height: 44rpx !important;
 		font-size: 26rpx !important;
 	}
 
 	/deep/.input-value {
 		font-size: 26rpx !important;
-		height: 38rpx !important;
+		height: 44rpx !important;
 
 		uni-text {
 			font-size: 26rpx !important;

+ 399 - 0
pages/saleManage/components/selectProject.vue

@@ -0,0 +1,399 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="选择" @clickLeft="backAdd">
+
+		</uni-nav-bar>
+		<view class="searchBox">
+			<input v-model="searchVal" placeholder="请输入名称" class="searchInput" />
+			<u-button type="icon-shixiangxinzeng" size="30" @click="doSearch" data-icon="Search" class="searchBtn">
+				<view class="iconfont icon-sousuo"></view>
+				<view class="text">搜索</view>
+			</u-button>
+		</view>
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent">
+				<checkbox-group v-for="(item, index) in listData" :key="index" @change="e => selectVal(e, item, index)">
+					<label>
+						<view class="listBox">
+							<view class="listBox-sel">
+								<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
+									:checked="item.checked" />
+							</view>
+							<view class="listBox-con">
+								<view class="listBox-top">
+									<view class="listBox-name">
+										{{ item.name }}
+									</view>
+									<view class="listBox-code">
+										{{ item.code }}
+									</view>
+								</view>
+								<view class="listBox-bottom">
+									<view>负责部门:{{ item.responsibleDeptName }}</view>
+									<view>项目经理:{{ item.responsibleUserName }}</view>
+									<view>项目团队:{{ item.teamName }}</view>
+									<view>项目周期:{{ item.cycle }}</view>
+									<view>项目预算:{{ item.budget }}</view>
+									<view>计划开始日期:{{ item.planStartDate }}</view>
+									<view>计划完成日期:{{ item.planEndDate }}</view>
+								</view>
+							</view>
+						</view>
+					</label>
+				</checkbox-group>
+				<u-empty class="noDate" style="margin-top: 20vh" v-if="!listData.length"></u-empty>
+			</u-list>
+		</view>
+
+		<view class="footer">
+			<view class="bottom" v-if="this.isAll==1">
+				<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
+				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
+				</checkbox>
+			</view>
+			<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen" @click="jumpAdd">
+				<view class="selBtn">选择( {{ checkListLen }} )</view>
+			</u-button>
+		</view>
+		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择部门"
+			:localdata="classificationList" valueKey="id" textKey="name" />
+	</view>
+</template>
+
+<script>
+	import {
+		projectsPageAPI,
+	} from '@/api/saleManage/saleorder'
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	export default {
+		components: {
+			baTreePicker
+		},
+
+		data() {
+			return {
+				page: 1,
+				size: 20,
+				isEnd: true,
+				searchVal: '',
+				pickTabIndex: 1,
+				popupShow: false, //右侧搜索窗
+				typeIndex: 1,
+				listData: [], //列表数据
+				classificationList: [], //分类数据
+				seletedAll: false, //全选状态,
+				isAll: ''
+
+			}
+		},
+		//选择的列表长度
+		computed: {
+
+			checkListLen() {
+
+				return this.listData.filter(el => el.checked).length
+			},
+
+		},
+		onLoad({
+			isAll
+		}) {
+			this.isAll = isAll //1多选 2单选
+			this.getList()
+		},
+		onShow() {},
+		methods: {
+			scrolltolower() {
+				if (this.isEnd) {
+					return
+				}
+				// 显示加载图标
+				uni.showLoading({
+					title: '数据加载中'
+				})
+				//获取更多数据
+				this.page++
+				this.getList()
+			},
+			//列表数据
+			async getList() {
+				this.isEnd = false
+				this._getClassifyList()
+			},
+			async _getClassifyList() {
+				uni.showLoading({
+					title: '数据加载中'
+				})
+				const params = {
+					pageNum: 1,
+					size: this.page,
+					name: this.searchVal,
+				}
+
+				projectsPageAPI(params).then(res => {
+					uni.hideLoading()
+					if (this.page == 1) {
+						this.listData = []
+					}
+					this.listData = this.listData.concat(res.list)
+					this.isEnd = this.listData.length >= res.count
+				})
+			},
+			confirm([id]) {
+				this.categoryLevelId = id
+				this.page = 1
+				this.getList()
+			},
+			async getClassify() {
+				listOrganizations(1).then(res => {
+					this.classificationList = res
+					this.page = 1
+					this.getList()
+				});
+			},
+			doSearch() {
+				this.page = 1
+				this.getList()
+			},
+			//勾选
+			selectVal(e, val, index) {
+
+				this.$set(this.listData[index], 'checked', !this.listData[index].checked)
+
+				if (this.isAll != 1) {
+					this.listData.forEach((item, i) => {
+						if (item.id != val.id) {
+							this.$set(this.listData[i], 'checked', false)
+						}
+					})
+				} else {
+
+					this.seletedAll = !this.listData.some(item => !item.checked)
+				}
+
+			},
+			//全选按钮
+			_seletedAll() {
+				if (!this.seletedAll) {
+					this.seletedAll = true
+					this.listData.map(item => {
+						this.$set(item, 'checked', true)
+					})
+				} else {
+					this.seletedAll = false
+					this.listData.map(item => {
+						this.$set(item, 'checked', false)
+					})
+				}
+			},
+			//跳转回添加页面
+			jumpAdd() {
+				uni.$emit(
+					'setProject',
+					this.listData.filter(item => item.checked)
+				)
+
+				uni.navigateBack()
+			},
+			//返回添加页
+			backAdd() {
+				uni.navigateBack()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.mainBox {
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+
+		.wrapper {
+			flex: 1;
+			overflow: hidden;
+		}
+
+		.searchBox {
+			padding: 10rpx 0;
+			box-sizing: border-box;
+			background-color: #dedede;
+			height: 90rpx;
+			width: 100%;
+			line-height: 90rpx;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+
+			input {
+				height: 78rpx;
+				width: 65%;
+				background: #f9f9f9 !important;
+				margin: 0 10rpx;
+				padding: 0 10rpx;
+				box-sizing: border-box;
+				border-radius: 5rpx;
+			}
+
+			.searchBtn {
+				height: 80rpx;
+				background: #f9f9f9 !important;
+				color: #676767;
+				font-size: 28rpx;
+				padding: 0 42rpx;
+				box-sizing: border-box;
+				outline: none;
+				border: none;
+				width: 260rpx;
+
+				.icon-sousuo {
+					font-size: 22px;
+				}
+
+				.text {
+					font-size: 16px;
+					margin-left: 10px;
+				}
+			}
+		}
+
+		.tab-title {
+			position: fixed;
+			top: 190rpx;
+			z-index: 99;
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			height: $tab-height;
+			line-height: $tab-height;
+			background-color: #ffffff;
+			border-bottom: 2rpx solid #f2f2f2;
+			box-sizing: border-box;
+
+			.tab-item {
+				width: 25%;
+				text-align: center;
+				font-size: 32rpx;
+				color: $uni-text-color-grey;
+			}
+
+			.tab-item.active {
+				color: $j-primary-border-green;
+				border-bottom: 1px solid $j-primary-border-green;
+				font-weight: bold;
+			}
+
+			.tab-item.filter {
+				flex: 1;
+				padding: 0px 30rpx;
+
+				.uni-icons {
+					display: flex;
+					padding-top: 5px;
+				}
+			}
+
+			.screenIcon {
+				display: flex;
+				width: 80px;
+				justify-content: center;
+
+				.screenText {
+					font-size: 32rpx;
+					color: $uni-text-color-grey;
+				}
+			}
+		}
+
+		.listContent {
+			height: 100% !important;
+
+			.listBox {
+				display: flex;
+				// height: 180rpx;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid #e5e5e5;
+
+				.listBox-sel {
+					height: 90rpx;
+					width: 80rpx;
+					// line-height: 90rpx;
+					text-align: center;
+
+					checkbox {
+						transform: scale(1.2);
+					}
+				}
+
+				.listBox-con {
+					width: 100%;
+					// display: flex;
+					// flex-wrap: wrap;
+					// justify-content: space-between;
+					align-items: center;
+					padding: 0 18rpx 0 0;
+
+					.listBox-top {
+						width: 100%;
+						display: flex;
+						justify-content: space-between;
+						padding-bottom: 10rpx;
+
+						.listBox-name,
+						.listBox-code {
+							display: inline-block;
+							font-size: $uni-font-size-sm;
+							font-weight: bold;
+						}
+					}
+
+					.listBox-bottom {
+						width: 100%;
+						display: flex;
+						justify-content: space-between;
+						font-size: $uni-font-size-sm;
+						flex-wrap: wrap;
+
+						>view {
+							width: 50%;
+							overflow: hidden;
+							white-space: nowrap;
+							text-overflow: ellipsis;
+						}
+					}
+				}
+			}
+
+			.noDate {
+				height: 100%;
+			}
+		}
+
+		//底部按钮
+		.footer {
+			height: 90rpx;
+			position: relative;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			bottom: 0;
+			width: 100%;
+			height: 100rpx;
+			border-top: 1rpx solid #eeecec;
+			background-color: #ffffff;
+			z-index: 999;
+
+			.bottom {
+				margin-left: 10rpx;
+			}
+
+			.u-reset-button {
+				position: absolute;
+				right: 10rpx;
+				top: 20rpx;
+				width: 150rpx;
+			}
+		}
+	}
+</style>

+ 2 - 2
pages/saleManage/components/selectUser.vue

@@ -130,7 +130,7 @@ import {
 				})
 				const params = {
 					pageNum: 1,
-					size:-1,
+					size:100,
 					name: this.searchVal,
 					groupId: this.categoryLevelId
 				}
@@ -153,7 +153,7 @@ import {
 				listOrganizations(1).then(res => {
 					this.classificationList = res
 					this.page = 1
-					// this.getList()
+					this.getList()
 				});
 			},
 			doSearch() {

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

@@ -53,6 +53,8 @@
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/add',
 					judge: [{
+						authorities: 'eom:contact:update',
+					},{
 						key: 'assignStatus',
 						value: [0]
 					}],
@@ -69,6 +71,8 @@
 					type: '2',
 					pageUrl: '',
 					judge: [{
+						authorities: 'eom:contact:free',
+					},{
 						key: 'assignStatus',
 						value: [1]
 					}],
@@ -79,6 +83,8 @@
 					type: '2',
 					pageUrl: '',
 					judge: [{
+						authorities: 'eom:contact:assign',
+					},{
 						key: 'assignStatus',
 						value: [0]
 					}],
@@ -89,6 +95,8 @@
 					type: '2',
 					pageUrl: '',
 					judge: [{
+						authorities: 'eom:contact:delete',
+					},{
 						key: 'assignStatus',
 						value: [0]
 					}],
@@ -99,13 +107,13 @@
 			}
 		},
 
-		async onLoad() {
+		async onShow() {
 			getTreeByPid(17).then(res => {
 				this.classificationList = res.data
 			
 			});
 			this.$nextTick(() => {
-				this.$refs.contactListRef.getList({
+				this.$refs.contactListRef.doSearch({
 					type: 1,
 					
 				})

+ 1 - 2
pages/saleManage/contact/components/comment.vue

@@ -191,7 +191,6 @@
 			},
 			//发布动态
 			async updateContactDynamics() {
-				this.show = false;
 
 				await updateContactDynamics({
 					id: this.row.id,
@@ -210,7 +209,7 @@
 					}]
 				});
 				const data = await contactDetail(this.row.id);
-				this.content = ''
+				this.cancel1()
 				this.init(data.base);
 			},
 			/**

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

@@ -10,24 +10,24 @@
 				<view>
 					<view class="lable">销售订单总额</view>
 					<view>
-						{{ contactCountData.totalAmountSaleOrder||'' }}
+						{{ contactCountData.totalAmountSaleOrder||0 }}
 					</view>
 				</view>
 				<view>
 					<view class="lable">退货单总额</view>
-					<view>{{ contactCountData.totalAmountSaleOrderRecord||'' }}</view>
+					<view>{{ contactCountData.totalAmountSaleOrderRecord||0 }}</view>
 				</view>
 				<view>
 					<view class="lable">回款总额</view>
-					<view> {{ contactCountData.totalAmountReturn||'' }}</view>
+					<view> {{ contactCountData.totalAmountReturn||0 }}</view>
 				</view>
 				<view>
 					<view class="lable">退款总额</view>
-					<view>{{ contactCountData.totalAmountRecord||"" }}</view>
+					<view>{{ contactCountData.totalAmountRecord||0 }}</view>
 				</view>
 				<view>
 					<view class="lable">待回款总额</view>
-					<view>{{ contactCountData.totalAmountTreatReturn||'' }}</view>
+					<view>{{ contactCountData.totalAmountTreatReturn||0 }}</view>
 				</view>
 			</view>
 		</view>

+ 13 - 10
pages/saleManage/contact/components/followList.vue

@@ -1,18 +1,21 @@
 <template>
 	<view class="mainBox">
 		<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
-			<myCard @del="del(index,item)" @add="add('edit',item,index)" :item="item" :btnList="btnList" :index="index+1"
-				:columns="columns">
+			<myCard @del="del(index,item)" @add="add('edit',item,index)" :item="item" :btnList="btnList"
+				:index="index+1" :columns="columns">
 			</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('add')">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
 
-		
+
 
 	</view>
 </template>
@@ -95,14 +98,14 @@
 				type,
 				data
 			}) => {
-			
+
 				if (type == 'add') {
 					this.tableList.unshift(data)
 				} else {
 					this.$set(this.tableList, data.index, data)
 				}
-				if(this.pageName=='businessOpportunity'){
-					uni.$emit('savefollowList',data)
+				if (this.pageName == 'businessOpportunity') {
+					uni.$emit('savefollowList', data)
 					return
 				}
 				this.form.opportunityFollowupList = JSON.parse(JSON.stringify(this.tableList))
@@ -127,12 +130,12 @@
 					this.tableList = JSON.parse(JSON.stringify(data.opportunityFollowupList))
 				}
 			},
-			
 
-			del(index,item) {
+
+			del(index, item) {
 				this.tableList.splice(index, 1);
 				if (this.pageName == 'businessOpportunity') {
-					uni.$emit('delFollowList',item)
+					uni.$emit('delFollowList', item)
 					return
 				}
 				this.form.opportunityFollowupList = JSON.parse(JSON.stringify(this.tableList))

+ 7 - 1
pages/saleManage/contact/components/followListAdd.vue

@@ -9,7 +9,7 @@
 					v-model="form.linkName"></u--input>
 			</u-cell>
 			<u-cell title="跟进时间" arrow-direction="down">
-				<uni-datetime-picker type="datetime" slot="value" v-model="form.followupTime">
+				<uni-datetime-picker @click.native="setTime" type="datetime" slot="value" v-model="form.followupTime">
 				</uni-datetime-picker>
 			</u-cell>
 			<u-cell title="跟进阶段" arrow-direction="down">
@@ -99,6 +99,12 @@
 			showPicker() {
 				this.$refs.treePicker._show(this.categoryIdList.map(item => item.id));
 			},
+			setTime(){
+				if(!this.form.followupTime){
+					this.form.followupTime= uni.$u.date(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss')
+				}
+				console.log(this.form.followupTime)
+			},
 			save() {
 				if (!this.form.followupTime) {
 					this.$refs.uToast.show({

+ 175 - 0
pages/saleManage/contact/followList.vue

@@ -0,0 +1,175 @@
+<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>
+
+		<followList ref="followListRef" :linkList="linkList" :isDrawer="true">
+		</followList>
+
+	</view>
+</template>
+
+<script>
+	import followList from "@/pages/saleManage/contact/components/followList.vue"
+	import {
+		contactDetail,
+		contactSave
+	} from '@/api/saleManage/contact/index.js'
+
+	export default {
+		components: {
+			followList,
+		},
+
+		data() {
+			return {
+				form: {
+					address: '',
+					addressId: '',
+					addressName: '',
+					authorizationLimit: 0,
+					businessLicenseFiles: [],
+					businessLicenseFile: [],
+					businessScope: '',
+					categoryId: '',
+					categoryName: '',
+					companyCategoryId: '',
+					companyCategoryName: '',
+					enterpriseTypeId: '',
+					enterpriseTypeName: '',
+					legalPerson: '',
+					registeredCapital: '',
+					parentId: '',
+					industry: [],
+					industryCode: '',
+					industryFullName: '',
+					mainProduct: '',
+					name: '',
+					officialIndustry: '',
+					phone: '',
+					registerDate: '',
+					remark: '',
+					serialNo: '',
+					simpleName: '',
+					type: 1,
+					unifiedSocialCreditCode: ''
+				},
+				otherForm: {
+					settlementMode: '',
+					settlementModeName: '',
+					taxRate: 0,
+					address: '',
+					addressId: '',
+					deptId: '',
+					deptName: '',
+					discount: 0,
+					salesmanId: '',
+					salesmanName: '',
+					sender: '',
+					senderPhone: ''
+				},
+				bankList: [],
+				linkList: [],
+			}
+		},
+		computed: {
+
+		},
+
+
+		onLoad(data) {
+			uni.$off('setContact')
+			uni.$on('setContact', ({
+				key,
+				data
+			}) => {
+				this[key] = data
+				this.save()
+			})
+			contactDetail(data.id).then(async res => {
+
+				this.form = res.base
+				this.otherForm = res.other
+				this.bankList = res.bankList
+				this.linkList = res.linkList
+				this.$nextTick(() => {
+					this.$refs.followListRef.init(res.base)
+				})
+			})
+		},
+		onUnload() {
+			uni.$off('setContact')
+		},
+		methods: {
+			save() {
+				try {
+
+					const data = {
+						base: this.form,
+						other: this.otherForm,
+						bankList: this.bankList,
+						linkList: this.linkList,
+					};
+
+					contactSave(data)
+
+				} catch (error) {
+					console.log(error, 'error')
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.add {
+		width: 96rpx;
+		height: 96rpx;
+		border-radius: 48rpx;
+		background: #3c9cff;
+		position: fixed;
+		bottom: 100rpx;
+		right: 24rpx;
+		display: flex;
+		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/index.vue

@@ -67,13 +67,13 @@
 			}
 		},
 
-		async onLoad() {
+		async onShow() {
 			getTreeByPid(17).then(res => {
 				this.classificationList = res.data
 			
 			});
 			this.$nextTick(() => {
-				this.$refs.contactListRef.getList({
+				this.$refs.contactListRef.doSearch({
 					type: 1,
 					assignStatus: 0,
 				})

+ 22 - 14
pages/saleManage/contact/myList.vue

@@ -7,19 +7,19 @@
 					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>
@@ -56,21 +56,28 @@
 					btnType: 'primary',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/components/drawer'
-				}],
+				}, {
+					name: '跟进',
+					apiName: '',
+					btnType: 'primary',
+					type: '1',
+					pageUrl: '/pages/saleManage/contact/followList',
+					judge: [],
+				}, ],
 				searchVal: '',
 				categoryLevelId: '',
 				classificationList: []
 			}
 		},
 
-		async onLoad() {
+		async onShow() {
 			getTreeByPid(17).then(res => {
 				this.classificationList = res.data
 
 			});
 			this.userInfo = uni.getStorageSync('userInfo')
 			this.$nextTick(() => {
-				this.$refs.contactListRef.getList({
+				this.$refs.contactListRef.doSearch({
 					type: 1,
 					salesmanId: this.userInfo.userId,
 					name: this.searchVal,
@@ -119,6 +126,7 @@
 		align-items: center;
 		justify-content: center;
 	}
+
 	.top-wrapper {
 		background-color: #fff;
 		display: flex;
@@ -127,16 +135,16 @@
 		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;
@@ -148,7 +156,7 @@
 			margin: 0;
 			margin-left: 26rpx;
 		}
-	
+
 		.menu_icon {
 			width: 44rpx;
 			height: 44rpx;

+ 41 - 4
pages/saleManage/saleOrder/add.vue

@@ -43,8 +43,8 @@
 			<u-cell title="计价方式" arrow-direction="down">
 
 				<radio-group @change="radioChange" v-model="form.pricingWay" slot="value">
-					<radio  :disabled="!!form.contractId" value="1" :checked="form.pricingWay==1">按数量计价</radio>
-					<radio  :disabled="!!form.contractId" value="2" :checked="form.pricingWay==2">按重量计价</radio>
+					<radio :disabled="!!form.contractId" value="1" :checked="form.pricingWay==1">按数量计价</radio>
+					<radio :disabled="!!form.contractId" value="2" :checked="form.pricingWay==2">按重量计价</radio>
 
 				</radio-group>
 			</u-cell>
@@ -334,7 +334,8 @@
 						type: 'action',
 						className: 'perce100',
 					}],
-				]
+				],
+				projectData: {}
 
 			}
 		},
@@ -380,6 +381,31 @@
 					this.$set(this.form, 'partbEmail', data[0].email);
 				}
 			})
+			//选择项目
+			uni.$off('setProject')
+			uni.$on('setProject', async (data) => {
+				if (data && data.length > 0) {
+					this.projectData = data[0];
+					this.form = Object.assign({}, this.form, {
+						projectName: this.projectData.name,
+						projectId: this.projectData.id
+					});
+
+					if (this.projectData.contractId) {
+
+						this.form = Object.assign({}, this.form, {
+							contractId: this.projectData.contractId,
+							contractName: this.projectData.contractName
+						});
+						this.getContract(this.projectData.contractId);
+					} else if (this.projectData.contactId) {
+						const data = await contactDetail(this.projectData.contactId);
+						if (data.base?.id) {
+							this.changeParent(data.base);
+						}
+					}
+				}
+			})
 		},
 		onLoad(data) {
 
@@ -394,6 +420,7 @@
 			uni.$off('setSelectList')
 			uni.$off('allsum')
 			uni.$off('setUserInfo')
+			uni.$off('setProject')
 
 		},
 		methods: {
@@ -517,6 +544,13 @@
 					url: '/pages/saleManage/components/selectContract?isAll=' + 2
 				})
 			},
+			//选择合同
+			selectProjectShow() {
+				uni.navigateTo({
+					url: '/pages/saleManage/components/selectProject?isAll=' + 2
+				})
+			},
+
 			//选择合同获取合同的详情
 			async getContract(id) {
 				const data = await getContract(id);
@@ -688,7 +722,10 @@
 						return
 					}
 					if (this.$refs.produceListRef.getValue().length == 0) {
-						this.$message.warning('产品清单不能为空');
+						this.$refs.uToast.show({
+							type: "error",
+							message: "产品清单不能为空",
+						})
 						return;
 					}
 

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

@@ -9,30 +9,30 @@
 
 				<view>
 					<view class="lable">订单数量</view>
-					<view>{{orderNoCountData.saleOrderNumber}}</view>
+					<view>{{orderNoCountData.saleOrderNumber||0}}</view>
 				</view>
 				<view>
 					<view class="lable">订单总金额</view>
-					<view>{{orderNoCountData.totalAmountSaleOrder}}</view>
+					<view>{{orderNoCountData.totalAmountSaleOrder||0}}</view>
 				</view>
 				<view>
 					<view class="lable">应收款</view>
-					<view>{{orderNoCountData.receivable}}</view>
+					<view>{{orderNoCountData.receivable||0}}</view>
 				</view>
 				<view>
 					<view class="lable">
 						发货数量</view>
-					<view>{{orderNoCountData.sendNumber}}</view>
+					<view>{{orderNoCountData.sendNumber||0}}</view>
 				</view>
 				<view>
 					<view class="lable">
 						退货数量</view>
-					<view>{{orderNoCountData.returnNumber}}</view>
+					<view>{{orderNoCountData.returnNumber||0}}</view>
 				</view>
 				<view>
 					<view class="lable">
 						退货金额</view>
-					<view>{{orderNoCountData.returnAmount}}</view>
+					<view>{{orderNoCountData.returnAmount||0}}</view>
 				</view>
 			</view>
 		</view>

+ 1 - 1
pages/saleManage/saleOrder/index.vue

@@ -164,7 +164,7 @@
 				let data = {
 					pageNum: this.page,
 					size: this.size,
-					partaName:this.partaName
+					partaName:this.searchVal
 				}
 				getTableList(data).then(res => {
 					if (this.page === 1) {