Преглед на файлове

commit -m 机构资料备注优化

zhengjinyi преди 3 години
родител
ревизия
17ed229a0e

+ 3 - 0
components/cm-module/cm-seller/cm-screen-drawer.vue

@@ -155,18 +155,21 @@ export default {
 				followup:0,// 跟进状态
 			},
 			priceActions:[
+				{name:'全部',value:0},
 				{name:'敏感',value:1},
 				{name: '适中',value:2},
 				{name: '不敏感',value:3},
 				{name: '不明确',value:4}
 			],
 			intenActions:[
+				{name:'全部',value:0},
 				{name:'意向强烈',value:1},
 				{name: '意向一般',value:2},
 				{name: '意向平淡',value:3},
 				{name: '随便看看',value:4}
 			],
 			stateActions:[
+				{name:'全部',value:0},
 				{name:'跟进中',value:1},
 				{name: '跟进完成',value:2},
 				{name: '已放弃',value:3},

+ 28 - 6
pages/seller/remarks/add-record.vue

@@ -46,6 +46,8 @@
 							v-model="item.label"
 							placeholder="请输入关键词,不超过10个汉字"
 							maxlength="10"
+							@focus="hideAssAction(item, $event)"
+							@blur="hideAssAction(item, $event)"
 							@input="bindRemarkAction(index, $event)"
 						/>
 						<view class="list-view-assAction" v-if="item.isAssociation">
@@ -68,7 +70,7 @@
 						></text>
 						<text
 							class="iconfont icon-shanchu4"
-							v-if="remarksList.length > 1 && index !== remarksList.length - 1"
+							v-if="remarksList.length > 1 && index != remarksList.length - 1"
 							@click="deleteLogistItemFn(item, index)"
 						></text>
 					</view>
@@ -314,6 +316,7 @@ export default {
 		},
 		bindRemarkAction(index, event) {
 			this.checkRemarkIndex = index
+			this.assActionList = []
 			if (event.detail.value != '') {
 				this.UserService.getCmremarkslist({remarks : event.detail.value}).then(response => {
 					if(response.data&&response.data.length>0){
@@ -331,14 +334,18 @@ export default {
 				this.remarksList[index].isAssociation = false
 			}
 		},
+		hideAssAction(item, event){//隐藏对应的联想弹窗
+			item.isAssociation = false
+		},
 		SelectAssociationFn(ass,item) {
 			//选择关键词
 			item.isAssociation = false
 			item.label = ass
 		},
-		addListFn() {
+		addListFn(item,index) {
 			//添加
 			let obj = { label: '',isAssociation:false}
+			item.isAssociation = false
 			this.remarksList.push(obj)
 		},
 		deleteLogistItemFn(item, index) {
@@ -370,14 +377,28 @@ export default {
 			//统一处理关键词
 			let remarksList = []
 			for (const el of this.remarksList) {
-				remarksList.push(el.label)
+				if(el.label!=''){
+					remarksList.push(el.label)
+				}
 			}
-			this.remarksParams.remarks = JSON.stringify(remarksList)
-			console.log('remarksParams',this.remarksParams)
-			if (this.remarksParams.remarks == '') {
+			if (remarksList.length == 0) {
 				this.$util.msg('请输入关键词记录', 2000)
 				return
 			}
+			if (!this.remarksParams.pinceSensitve) {
+				this.$util.msg('请选择价格敏感度', 2000)
+				return
+			}
+			if (!this.remarksParams.satisfied) {
+				this.$util.msg('请选择意向程度', 2000)
+				return
+			}
+			if (!this.remarksParams.followup) {
+				this.$util.msg('请选择跟进状态', 2000)
+				return
+			}
+			this.remarksParams.remarks = JSON.stringify(remarksList)
+			console.log('remarksParams',this.remarksParams)
 			this.UserService.getUserClubVisitorSaveAdd({
 				params: JSON.stringify(this.remarksParams)
 			})
@@ -831,6 +852,7 @@ page {
 	bottom: 0;
 	left: 0;
 	background-color: #ffffff;
+	z-index: 9999;
 	.edit-button-canel {
 		width: 100%;
 		height: 88rpx;

+ 28 - 6
pages/seller/remarks/add.vue

@@ -73,6 +73,8 @@
 							v-model="item.label"
 							placeholder="请输入关键词,不超过10个汉字"
 							maxlength="10"
+							@focus="hideAssAction(item, $event)"
+							@blur="hideAssAction(item, $event)"
 							@input="bindRemarkAction(index, $event)"
 						/>
 						<view class="list-view-assAction" v-if="item.isAssociation">
@@ -95,7 +97,7 @@
 						></text>
 						<text
 							class="iconfont icon-shanchu4"
-							v-if="remarksList.length > 1 && index !== remarksList.length - 1"
+							v-if="remarksList.length > 1 && index != remarksList.length - 1"
 							@click="deleteLogistItemFn(item, index)"
 						></text>
 					</view>
@@ -354,6 +356,7 @@ export default {
 				})
 		},
 		bindRemarkAction(index, event) {
+			this.assActionList = []
 			this.checkRemarkIndex = index
 			if (event.detail.value != '') {
 				this.UserService.getCmremarkslist({remarks : event.detail.value}).then(response => {
@@ -372,14 +375,18 @@ export default {
 				this.remarksList[index].isAssociation = false
 			}
 		},
+		hideAssAction(item, event){//隐藏对应的联想弹窗
+			item.isAssociation = false
+		},
 		SelectAssociationFn(ass,item) {
 			//选择关键词
 			item.isAssociation = false
 			item.label = ass
 		},
-		addListFn() {
+		addListFn(item,index) {
 			//添加
 			let obj = { label: '',isAssociation:false}
+			item.isAssociation = false
 			this.remarksList.push(obj)
 		},
 		deleteLogistItemFn(item, index) {
@@ -418,14 +425,28 @@ export default {
 			//统一处理关键词
 			let remarksList = []
 			for (const el of this.remarksList) {
-				remarksList.push(el.label)
+				if(el.label!=''){
+					remarksList.push(el.label)
+				}
 			}
-			this.remarksParams.remarks = JSON.stringify(remarksList)
-			console.log('remarksParams',this.remarksParams)
-			if (this.remarksParams.remarks == '') {
+			if (remarksList.length == 0) {
 				this.$util.msg('请输入关键词记录', 2000)
 				return
 			}
+			if (!this.remarksParams.pinceSensitve) {
+				this.$util.msg('请选择价格敏感度', 2000)
+				return
+			}
+			if (!this.remarksParams.satisfied) {
+				this.$util.msg('请选择意向程度', 2000)
+				return
+			}
+			if (!this.remarksParams.followup) {
+				this.$util.msg('请选择跟进状态', 2000)
+				return
+			}
+			this.remarksParams.remarks = JSON.stringify(remarksList)
+			console.log('remarksParams',this.remarksParams)
 			this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.isConfirmLoding = true
 			this.UserService.getUserClubRemarksSave({
@@ -921,6 +942,7 @@ page {
 	bottom: 0;
 	left: 0;
 	background-color: #ffffff;
+	z-index: 9999;
 	.edit-button-canel {
 		width: 100%;
 		height: 88rpx;

+ 8 - 3
pages/seller/remarks/details.vue

@@ -29,6 +29,11 @@
 					咨询类别:<text>{{ remarksParams.consultBack ? remarksParams.consultBack : '无' }}</text>
 				</view>
 			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1">
+					机构类型:<text>{{ remarksParams.clubType ? remarksParams.clubType : '无' }}</text>
+				</view>
+			</view>
 			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
 			<view class="tui-remarks-content">
 				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">
@@ -47,12 +52,12 @@
 			</view>
 			<view class="list-view-title">
 				<view class="list-view-h1"
-					>跟进状态:<text>{{ remarksParams.followup | statusText }}</text></view
+					>跟进状态:<text>{{ remarksParams.followup | followupFilters }}</text></view
 				>
 			</view>
 			<view class="list-view-title">
 				<view class="list-view-h1"
-					>额外说明:<text>{{ remarksParams.extra }}</text></view
+					>额外说明:<text>{{ remarksParams.extra ? remarksParams.extra : '无' }}</text></view
 				>
 			</view>
 			<view class="list-view-title" v-if="remarksParams.imageList.length > 0">
@@ -111,7 +116,7 @@ export default {
 		this.getUserClubRemarksDetail()
 	},
 	filters: {
-		statusText(value) {
+		followupFilters(value) {
 			// 订单来源
 			const map = {
 				1: '跟进中',

+ 6 - 5
pages/seller/remarks/list.vue

@@ -10,7 +10,7 @@
 					v-model="listQuery.keyWord"
 					@input="onShowClose"
 					@confirm="getUserClubRemarksList"
-					placeholder="搜索关键词"
+					placeholder="搜索关键词 / 咨询人 / 机构名称"
 					maxlength="16"
 				/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
@@ -50,12 +50,12 @@
 						</view>
 						<view class="tui-remarks-title-bot">
 							<view class="tui-remarks-text-view">
-								<view class="tui-remarks-text a"
+								<view class="tui-remarks-text h"
 									><text class="iconfont icon-bianji"></text>记录人:{{ remark.recordName }}</view
 								>
 							</view>
-							<view class="tui-remarks-text-view">
-								<view class="tui-remarks-text h" v-if="listQuery.manager >= 0"
+							<view class="tui-remarks-text-view" v-if="listQuery.manager >= 0">
+								<view class="tui-remarks-text h"
 									><text class="iconfont icon-guanliyuan"></text>管理员:{{
 										remark.leaderName ? remark.leaderName : ''
 									}}</view
@@ -323,6 +323,7 @@ export default {
 			this.$api.navigateTo(`/pages/seller/remarks/add?userId=${data.userId}`)
 		},
 		handSearchConfirmData(data) {
+			console.log('确定筛选', data)
 			//确定筛选
 			this.listQuery.startAddTime = data.startAddTime
 			this.listQuery.endAddTime = data.endAddTime
@@ -332,7 +333,7 @@ export default {
 			this.listQuery.pinceSensitve = data.pinceSensitve
 			this.listQuery.satisfied = data.satisfied
 			this.listQuery.followup = data.followup
-			console.log('确定筛选', this.listQuery)
+			
 			this.getUserClubRemarksList()
 		},
 		showScreenDrawer() {

+ 138 - 69
pages/seller/remarks/record-details.vue

@@ -2,21 +2,50 @@
 	<view class="container qualifications" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0' }">
 		<view class="remarks-content">
 			<view class="list-view-title">
-				<view class="list-view-h1">咨询人:<text>{{ remarksParams.questionMan }}</text></view>
+				<view class="list-view-h1"
+					>咨询人:<text>{{ remarksParams.questionMan }}</text></view
+				>
+			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1"
+					>咨询类别:{{ remarksParams.consultBack ? remarksParams.consultBack : '无' }}</view
+				>
+			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1">
+					机构类型:<text>{{ remarksParams.clubType ? remarksParams.clubType : '无' }}</text>
+				</view>
 			</view>
-			<view class="list-view-title"> <view class="list-view-h1">咨询类别:{{ remarksParams.consultBack ? remarksParams.consultBack : '无' }}</view> </view>
 			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
 			<view class="tui-remarks-content">
 				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">
-					{{ label }}
+					{{ label.label }}
 				</text>
 			</view>
-			<view class="list-view-title"> <view class="list-view-h1">价格敏感度:<text>{{ remarksParams.questionMan }}</text> </view> </view>
-			<view class="list-view-title"> <view class="list-view-h1">意向程度:<text>{{ remarksParams.questionMan }}</text></view> </view>
-			<view class="list-view-title"> <view class="list-view-h1">跟进状态:<text>{{ remarksParams.questionMan }}</text></view> </view>
-			<view class="list-view-title"> <view class="list-view-h1">额外说明:<text>{{ remarksParams.questionMan }}</text></view> </view>			
-			<view class="list-view-title" v-if="remarksParams.imageList.length>0"> <view class="list-view-h1">图片</view> </view>
-			<view class="list-view-upload clearfix" v-if="remarksParams.imageList.length>0">
+			<view class="list-view-title">
+				<view class="list-view-h1"
+					>价格敏感度:<text>{{ remarksParams.pinceSensitve | pinceFilters }}</text>
+				</view>
+			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1"
+					>意向程度:<text>{{ remarksParams.satisfied | intenActionsFilters }}</text></view
+				>
+			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1"
+					>跟进状态:<text>{{ remarksParams.followup | followupFilters }}</text></view
+				>
+			</view>
+			<view class="list-view-title">
+				<view class="list-view-h1"
+					>额外说明:<text>{{ remarksParams.extra ? remarksParams.extra : '无' }}</text></view
+				>
+			</view>
+			<view class="list-view-title" v-if="remarksParams.imageList.length > 0">
+				<view class="list-view-h1">图片</view>
+			</view>
+			<view class="list-view-upload clearfix" v-if="remarksParams.imageList.length > 0">
 				<view class="photo-item" v-for="(image, imageIndex) in remarksParams.imageList" :key="imageIndex">
 					<image
 						:src="image"
@@ -25,8 +54,15 @@
 					></image>
 				</view>
 			</view>
-			<view class="list-view-title" v-if="remarksParams.fileList.length>0"> <view class="list-view-h1">文件</view> </view>
-			<view class="list-view" v-for="(file, fileIndex) in remarksParams.fileList" :key="fileIndex" v-if="remarksParams.fileList.length>0">
+			<view class="list-view-title" v-if="remarksParams.fileList.length > 0">
+				<view class="list-view-h1">文件</view>
+			</view>
+			<view
+				class="list-view"
+				v-for="(file, fileIndex) in remarksParams.fileList"
+				:key="fileIndex"
+				v-if="remarksParams.fileList.length > 0"
+			>
 				<view class="list-view-text">
 					<view class="input">{{ file.fileName }}</view>
 					<view class="delbtn" @click.stop="previewFile(file)">预览</view>
@@ -49,8 +85,8 @@ export default {
 			isIphoneX: this.$store.state.isIphoneX,
 			productActions: [],
 			remarksParams: {},
-			remarksId:0,
-			categorys:'产品,二手,耗材'
+			remarksId: 0,
+			categorys: '产品,二手,耗材'
 		}
 	},
 	onLoad(option) {
@@ -58,6 +94,37 @@ export default {
 		this.remarksId = option.remarksId
 		this.getUserRemarksVisitDetail()
 	},
+	filters: {
+		followupFilters(value) {
+			// 订单来源
+			const map = {
+				1: '跟进中',
+				2: '跟进完成',
+				3: '已放弃'
+			}
+			return map[value]
+		},
+		pinceFilters(value) {
+			// 意向
+			const map = {
+				1: '敏感',
+				2: '适中',
+				3: '不敏感',
+				4: '不明确'
+			}
+			return map[value]
+		},
+		intenActionsFilters(value) {
+			// 意向
+			const map = {
+				1: '意向强烈',
+				2: '意向一般',
+				3: '意向平淡',
+				4: '随便看看'
+			}
+		 return map[value]
+		}
+	},
 	methods: {
 		...mapMutations(['login']),
 		getUserRemarksVisitDetail() {
@@ -82,56 +149,58 @@ export default {
 				longPressActions: ''
 			})
 		},
-		previewFile(file){//预览文件
+		previewFile(file) {
+			//预览文件
 			this.openDocument(file)
 		},
-		openDocument(file) {// 打开文档
-		    uni.showLoading({
-		        title:'加载中'
-		    })
-		    // 获取文件后缀
-		    const index = file.fileName.lastIndexOf('.')
-		    const suffix = file.fileName.substring(index + 1)
-		    // 下载文件
-		    uni.downloadFile({
-		        url: file.fileUrl,
-		        success(res) {
-		            const filePath = res.tempFilePath
-		            console.log(filePath) 
-		            // 打开文件
-		            uni.openDocument({
-		                filePath: filePath,
-		                fileType: suffix,
-		                success(res) {
-		                    uni.showToast({
-		                        icon:'success',
-		                        title:'打开成功',
-		                        duration: 1200
-		                    })
-		                    uni.hideLoading()
-		                },
-		                fail(err) {
-		                    if(err.errMsg.indexOf('fail filetype not supported')){
-		                        uni.showModal({
-		                            content: '不支持的文件预览',
-		                            cancelColor: '#666',
-		                            confirmColor: '#E15616'
-		                        })
-		                    }
-		                    uni.hideLoading()
-		                }
-		            })
-		        },
-		        fail(err){
-		            uni.showToast({
-		                title: JSON.stringify(err),
-		                icon:'none',
-		                duration: 5000
-		            })
-		            uni.hideLoading()
-		        },
-		    })
-		},
+		openDocument(file) {
+			// 打开文档
+			uni.showLoading({
+				title: '加载中'
+			})
+		 // 获取文件后缀
+			const index = file.fileName.lastIndexOf('.')
+			const suffix = file.fileName.substring(index + 1)
+			// 下载文件
+			uni.downloadFile({
+				url: file.fileUrl,
+				success(res) {
+					const filePath = res.tempFilePath
+					console.log(filePath)
+					// 打开文件
+					uni.openDocument({
+						filePath: filePath,
+						fileType: suffix,
+						success(res) {
+							uni.showToast({
+								icon: 'success',
+								title: '打开成功',
+								duration: 1200
+							})
+							uni.hideLoading()
+						},
+						fail(err) {
+							if (err.errMsg.indexOf('fail filetype not supported')) {
+								uni.showModal({
+									content: '不支持的文件预览',
+									cancelColor: '#666',
+									confirmColor: '#E15616'
+								})
+							}
+							uni.hideLoading()
+						}
+					})
+				},
+				fail(err) {
+					uni.showToast({
+						title: JSON.stringify(err),
+						icon: 'none',
+						duration: 5000
+					})
+		 		uni.hideLoading()
+				}
+			})
+		}
 	},
 	onShow() {}
 }
@@ -159,7 +228,7 @@ page {
 			color: #333333;
 			text-align: left;
 			font-weight: bold;
-			text{
+			text {
 				color: #666666;
 				font-weight: normal;
 			}
@@ -169,19 +238,19 @@ page {
 		width: 100%;
 		height: auto;
 		margin-bottom: 24rpx;
-		.tui-remarks-span{
+		.tui-remarks-span {
 			height: 48rpx;
 			line-height: 48rpx;
 			text-align: center;
 			padding: 0 20rpx;
-			background-color: #F7F7F7;
+			background-color: #f7f7f7;
 			font-size: $font-size-26;
 			color: #666666;
 			border-radius: 25rpx;
 			display: inline-block;
-			margin-right:24rpx;
+			margin-right: 24rpx;
 			margin-bottom: 24rpx;
-			&:nth-child(4n){
+			&:nth-child(4n) {
 				margin-right: none;
 			}
 		}
@@ -208,7 +277,7 @@ page {
 				float: left;
 				font-size: 26rpx;
 			}
-			.delbtn{
+			.delbtn {
 				width: 96rpx;
 				height: 44rpx;
 				border-radius: 8rpx;
@@ -217,8 +286,8 @@ page {
 				line-height: 44rpx;
 				text-align: center;
 				float: left;
-				&.down{
-					color: #1890F9;
+				&.down {
+					color: #1890f9;
 				}
 			}
 		}