liujq temp20230202 2 år sedan
förälder
incheckning
7325110615

+ 0 - 1
pages/agent/recommend/create.vue

@@ -61,7 +61,6 @@
 								</view>
 								<view class="p3" v-if="userInfo2.auth_state == 1">带看需收集:{{ item.report_visit }}</view>
 								<view class="p3" v-if="userInfo2.auth_state == 1">报备/带看保护期:{{ item.report_lock }}天/{{ item.lead_lock }}天</view>
-								<!-- <view class="p3" v-if="userInfo2.auth_state == 1">预计奖励:{{ item.brokerage }}</view> -->
 							</view>
 						</view>
 					</view>

+ 24 - 15
pages/cust/my.vue

@@ -4,9 +4,9 @@
 			<view v-if="customerList.length == 0" class="empty-wrap"><u-empty mode="list" text="暂无相关客户"></u-empty></view>
 			<view v-for="(item, index) in customerList" class="customer-item" :key="index">
 				<view class="info">
-					<view class="customer">
+					<view class="customer" @click="pageTo(`/pages/cust/myrecord?id=${item.id}&str=${item.name}(${item.sex === 'male' ? '男' : '女'})-${item.phone}`)">
 						<view class="relname">
-							<View class="n-key" @click="pageTo(`/pages/cust/myrecord?id=${item.id}&str=${item.name}(${item.sex === 'male' ? '男' : '女'})-${item.phone}`)">
+							<View class="n-key">
 								<view class="n">{{item.record_level}}</view>
 								{{ item.name }}
 								<u-icon
@@ -17,16 +17,7 @@
 								></u-icon>
 							</View>
 							
-							<u-icon
-								name="attach"
-								size="32"
-								label="快速报备"
-								label-size="28"
-								class="u-m-l-20"
-								color="#19be6b"
-								label-color="#19be6b"
-								@click="pageTo('/pages/agent/recommend/create', { info: item })"
-							></u-icon>
+							
 							<u-icon
 								name="list-dot"
 								size="32"
@@ -35,15 +26,14 @@
 								class="u-m-l-30"
 								color="#2d8cf0"
 								label-color="#2d8cf0"
-								@click="pageTo(`/pages/cust/myrecord?id=${item.id}&str=${item.name}(${item.sex === 'male' ? '男' : '女'})-${item.phone}`)"
 							></u-icon>
 						</view>
 
-						<view class="item" @click="pageTo(`/pages/cust/myrecord?id=${item.id}&str=${item.name}(${item.sex === 'male' ? '男' : '女'})-${item.phone}`)">
+						<view class="item">
 							<u-icon class="u-m-r-5" name="phone" size="22"></u-icon>
 							{{ item.phone }}
 						</view>
-						<view class="item" v-if="item.remark" @click="pageTo(`/pages/cust/myrecord?id=${item.id}&str=${item.name}(${item.sex === 'male' ? '男' : '女'})-${item.phone}`)">
+						<view class="item" v-if="item.remark">
 							{{ item.remark }}
 						</view>
 						
@@ -51,6 +41,15 @@
 					
 					
 					<view class="data-wrap">
+						<u-tag
+							icon="attach"
+							:text="'快速报备'"
+							:type="'success'"
+							class="u-m-r-10"
+							@click="pageTo('/pages/agent/recommend/create', { info: item })"
+						>
+						</u-tag>
+						<u-gap height="20"></u-gap>
 						<u-tag
 							icon="edit-pen"
 							:text="'编辑'"
@@ -59,6 +58,16 @@
 							@click="pageTo('/pages/cust/mycreate', { info: item })"
 						>
 						</u-tag>
+						<!-- <u-icon
+							name="attach"
+							size="32"
+							label="快速报备"
+							label-size="28"
+							class="u-m-r-10 u-m-t-30"
+							color="#19be6b"
+							label-color="#19be6b"
+							@click="pageTo('/pages/agent/recommend/create', { info: item })"
+						></u-icon> -->
 						<!-- <view class="u-m-t-20">							
 							<u-tag
 								@click="delHandle(item)"

+ 283 - 50
pages/cust/myrecordedit.vue

@@ -2,93 +2,230 @@
 	<view class="page">
 		<view class="form">
 			<u-form :model="form" ref="uForm">
+				<u-form-item label-width="150" label="意向方式" prop="groupTypeName">
+					<u-input type="select"  inputAlign="right" :select-open="groupTypeSelectShow" v-model="form.groupTypeName"  placeholder="请选择身份" @click="groupTypeSelectShow = true"></u-input>
+				</u-form-item>
+				<u-form-item label-width="150" label="意向项目" prop="estate_name">
+					<u-input type="select" :select-open="propertySelectShow" v-model="form.estate_name" inputAlign="right" placeholder="请选择推荐项目" @click="propertySelectShow = true"></u-input>
+				</u-form-item>
+				<u-form-item label-width="150" label="提醒时间" prop="cur_time" required>
+					<u-input placeholder="请输入" v-model="form.cur_time" type="number" inputAlign="right"></u-input>
+					<view style="color: #333" slot="right">天后提醒我</view>
+				</u-form-item>
 				<u-form-item label-width="150" label="备注信息" prop="record_remark" required label-position="top">
 					<u-input :placeholder="remarkTips" v-model="form.record_remark" type="textarea"></u-input>
 				</u-form-item>
 			</u-form>
-			<view class="scoped-more-img" @click="addImg">
-				<view class="t">上传图片</view>
-				<image class="img" v-if="curImgUrl" :src="curImgUrl" mode="aspectFill"></image>
+			<view class="scoped-more-img">
+				<view class="si-op" v-for="(url, index) in imgArr" :key="index">
+					<u-image :src="url" class="img" mode="heightFix" height="150rpx" @click="previewImageHandle(url)" ></u-image>
+					<u-image src="/static/icon_g_close.png" class="i" height="40rpx" @click="delImg(index)"></u-image>
+				</view>
+				<view class="si-op" @click="addImg">
+					<u-image src="/static/icon_upload_img.png" mode="heightFix" height="150rpx" class="img"></u-image>
+				</view>
 			</view>
 			
 			<u-gap height="60"></u-gap>
 			<u-button type="primary" @click="submitHandle">提交</u-button>
 		</view>
 		
-		<!-- 列表选择 -->
-		<u-select mode="single-column" :list="propertySelectList" v-model="propertySelectShow"
-			@confirm="propertySelectConfirm"></u-select>
-		<!-- modal -->
 		<!-- utoast -->
 		<u-toast ref="uToast" />
+		
+		
+		
+		
+		
+		<u-select mode="single-column" :list="groupTypeSelectList" v-model="groupTypeSelectShow" @confirm="groupTypeSelectConfirm"></u-select>
+		
+		
+		<!-- modal -->
+		<u-popup v-model="propertySelectShow" mode="center" width="90%" height="100%">
+			<view class="bwin-popup scoped-estate-popup">
+				<view class="scoped-popup-header-input">
+					<u-input class="input" v-model="curEstateName" placeholder="没找到楼盘??点这输入关键字搜索"></u-input>
+					<view class="b" @click="getEstateList">搜索</view>
+				</view>
+				<scroll-view :scroll-y="true" class="popup-body">
+					<view class="scoped-estate-list">
+						<view v-for="(item, index) in estateList" :class="form.estate_id == item.id ? 'sel-item cur' : 'sel-item'" @click="listItemHandle(item)" :key="index">
+							<view class="sel-left">
+								<image class="img" :src="item.pri_image" mode="aspectFill"></image>
+							</view>
+							<view class="sel-right">
+								<view class="p1">{{item.estate_name}}</view>
+								<view class="p2">
+									<u-tag
+										:text="areaTypeObj[item.area_type]"
+										:type="'success'"
+										size="mini"
+									></u-tag>
+								</view>
+								<view class="p3" v-if="userInfo2.auth_state == 1">带看需收集:{{ item.report_visit }}</view>
+								<view class="p3" v-if="userInfo2.auth_state == 1">报备/带看保护期:{{ item.report_lock }}天/{{ item.lead_lock }}天</view>
+								<!-- <view class="p3" v-if="userInfo2.auth_state == 1">预计奖励:{{ item.brokerage }}</view> -->
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="popup-footer" style="position: fixed;bottom: 12rpx;">
+					<u-button size="medium" @click="propertySelectShow = false">关闭</u-button>
+					<u-button size="medium" type="primary" @click="propertySelectShow = false">确定</u-button>
+				</view>
+			</view>
+		</u-popup>
+		
+		
+		
+		
 	</view>
 </template>
 <script>
+	import { arrToObj } from '@/utils'
 	export default {
 		data() {
 			return {
-				curImgUrl: '',
+				groupTypeSelectShow: false,
+				groupTypeSelectList: [],
+				estateList: [],
+				areaTypeObj: {},
+				userInfo2: {},
+				curEstateName: '',
+				propertySelectShow: false,
+				imgArr: [],
 				form: {
+					estate_id: '',
+					estate_name: '',
+					cur_time: '',
 					record_remark: null,
 				},
 				customer_id: null,
 				rules: {
-					record_remark: [{
-						required: true,
-						message: '备注不能为空',
-						trigger: ['change']
-					}, ]
+					record_remark: [
+						{
+							required: true,
+							message: '备注不能为空',
+							trigger: ['change']
+						},
+					],
+					cur_time: [
+						{ required: true, message: "提醒时间不能为空", trigger: ['blur', 'change'] }
+					],
 				},
-				remarkTips: '请输入:购房预算(总价/均价/面积段)~现居住区域~现居住产品/面积段~工作类型~购房需求/关注点~已经看过的房源情况',
-				
-
-				propertySelectShow: false,
-				propertySelectList: [],
+				remarkTips: '请输入',
+			
 			};
 		},
 		onLoad(data) {
 			this.customer_id = data.id
+			
+		  let userInfo2 = this.userInfo2 = uni.getStorageSync('MD_userInfo2')
+			const dictObj = uni.getStorageSync('MD_dict')
+			this.areaTypeObj = arrToObj(dictObj.area_type)
+			this.getEstateList()
+			this.form.group_type = userInfo2.group_type || '1'
+			let list = dictObj.group_type || []
+			let groupTypeSelectList = []
+			list.forEach(item => {
+				if (item.val == userInfo2.group_type) {
+					this.form.groupTypeName = item.key
+				}
+				groupTypeSelectList.push({
+					value: item.val,
+					label: item.key,
+				})
+			})
+			this.groupTypeSelectList = [...groupTypeSelectList]
+		},
+		created() {
+			
 		},
-		created() {},
 		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
 		onReady() {
 			this.$refs.uForm.setRules(this.rules);
 		},
 		methods: {
-			// // 选择所属项目回调
-			// propertySelectConfirm(e) {
-			// 	e.map((val, index) => {
-			// 		this.form.estate_id = val.value;
-			// 		this.form.estate_name = val.label;
-			// 	});
-			// },
+			groupTypeSelectConfirm(e) {
+				e.map((val, index) => {
+					this.form.group_type = val.value;
+					this.form.groupTypeName = val.label;
+				});
+			},
+			getEstateList () {
+				uni.api.estate.apiestatelist({page_size: 100, report_open: 1, estate_name: this.curEstateName}).then(res => {
+					let list = res.list || []
+					this.estateList = [...list]
+				})
+			},
+			listItemHandle (val) {
+				this.form.estate_id = val.estate_id;
+				this.form.estate_name = val.estate_name;
+			},
 			addImg () {
-				let token = uni.getStorageSync('MD_token')
+				this.uploadComImg((arr) => {
+					this.imgArr = [...this.imgArr, ...arr]
+					this.imgArr = [...imgArr]
+				}, 9)
+			},
+			uploadComImg (bc, count, moreStr) {
 				const that = this
 				uni.chooseImage({
-					count: 1, // 默认9
-					sizeType: ['compressed'],
+					count: count ? count : 1, // 默认9
+					sizeType: ['compressed'],  // original
 					sourceType: ['album', 'camera'],
 					success: function (res) {
 						const tempFilePaths = res.tempFilePaths
-						uni.uploadFile({
-							url: uni.baseUrl + 'api/upload/cloud',
-							filePath: tempFilePaths[0],
-							name: 'upload',
-							formData: {
-								'token': token
-							},
-							success (res){
-								const cData = JSON.parse(res.data)
-								that.curImgUrl = cData.data.url
-							}
-						})
+						if (tempFilePaths.length > 0) {
+							let imgBcArr = []
+							tempFilePaths.forEach((p, i) => {
+								that.diyUploadFile(p, moreStr).then(url => {
+									imgBcArr.push(url)
+									if (bc && imgBcArr.length === tempFilePaths.length) {
+										bc(imgBcArr)
+									}
+								})
+							})
+						}
 					}
 				})
 			},
+			diyUploadFile (filePath, moreStr) {
+				return new Promise((resolve, reject) => {
+					let token = uni.getStorageSync('MD_token')
+					let url = uni.baseUrl + 'api/upload/cloud'
+					// if (moreStr === 'noSign') url = uni.baseUrl + 'api/upload/cloud'
+					uni.uploadFile({
+						url,
+						filePath,
+						name: 'upload',
+						formData: {
+							'token': token
+						},
+						success (res){
+							const cData = JSON.parse(res.data)
+							let curImg = cData.data.url || ''
+							resolve(curImg)
+						}
+					})
+				})
+			},
+			delImg (index) {
+				let imgArr = [...this.imgArr]
+				imgArr.splice(index, 1)
+				this.imgArr = [...imgArr]
+			},
+			previewImageHandle (current, arr) {
+				uni.previewImage({
+					current,
+					urls: this.imgArr
+				})
+			},
 			submitHandle() {
 				const that = this
 				this.$refs.uForm.validate(valid => {
+					console.log(valid)
+					return
 					if (valid) {
 						// 验证成功
 						let apiStr = 'apiprivaterecordadd'
@@ -96,7 +233,7 @@
 							record_remark: that.form.record_remark,
 							customer_id: that.customer_id
 						}
-						if (that.curImgUrl) params.record_img = that.curImgUrl
+						if (that.imgArr) params.record_img = that.imgArr.join(',')
 						if (that.isEdit) {
 							apiStr = 'apiprivaterecordedit'
 							params.id = that.form.id
@@ -186,15 +323,111 @@
 	
 .scoped-more-img {
 	padding-top: 30rpx;
-	color: #2d8cf0;
-	text-decoration: underline;
-	.t {
-		padding-bottom: 20rpx;
-	}
-	.img {
-		width: 200rpx;
-		height: 200rpx;
+	.si-op {
+		display: inline-block;
+		vertical-align: middle;
+		width: 150rpx;
+		height: 150rpx;
+		margin-right: 30rpx;
+		margin-bottom: 30rpx;
+		position: relative;
+		border: 1PX solid #f2f2f2;
+		.img {
+			width: 150rpx;
+			height: 150rpx;
+		}
+		.i {
+			position: absolute;
+			top: -20rpx;
+			right: -20rpx;
+			width: 40rpx;
+			height: 40rpx;
+			z-index: 9;
+		}
 	}
 }	
 	
+	
+	
+	
+	
+.scoped-estate-popup {
+	height: 100%;
+	padding-bottom: 100rpx;
+	.popup-body {
+		box-sizing: border-box;
+		border-bottom: 1PX solid #dcdcdc;
+	}
+}
+.scoped-estate-list {
+	.sel-item {
+		display: flex;
+		border-bottom: 1PX solid #dcdcdc;
+		padding: 20rpx;
+		&.cur {
+			background: #369af7;
+			border-radius: 10rpx;
+			overflow: hidden;
+			.img {
+				opacity: .6;
+			}
+			.p1 {
+				color: #fff;
+			}
+			.p3 {
+				color: #fff;
+			}
+		}
+	}
+	.sel-left {
+		width: 180rpx;
+		border-radius: 10rpx;
+		.img {
+			width: 180rpx;
+			height: 120rpx;
+			border-radius: 10rpx;
+		}
+	}
+	.sel-right {
+		// width: 450rpx;
+		margin-left: 20rpx;
+		.p1 {
+			font-size: 30rpx;
+			font-weight: bold;
+			margin-bottom: 10rpx;
+		}
+		.p2 {
+			margin-bottom: 10rpx;
+		}
+		.p3 {
+			color: #369af7;
+			font-size: 24rpx;
+			font-weight: bold;
+		}
+	}
+}
+.scoped-popup-header-input {
+	position: fixed;
+	width: 90%;
+	display: flex;
+	border-bottom: 1PX solid #dcdcdc;
+	.input {
+		flex: 1;
+		padding-left: 20rpx;
+		height: 80rpx;
+		.u-input__input {
+			height: 80rpx;
+		}
+	}
+	.b {
+		width: 200rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		background: #2d8cf0;
+		color: #fff;
+		text-align: center;
+		margin-left: 20rpx;
+	}
+}
+
 </style>

BIN
static/icon_g_close.png


BIN
static/icon_upload_img.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/agent/recommend/create.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cust/my.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cust/myrecordedit.js.map


+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/agent/recommend/create.js

@@ -288,7 +288,6 @@ var _utils = __webpack_require__(/*! @/utils */ 65);
 //
 //
 //
-//
 var _default = {
   data: function data() {
     return {

+ 12 - 0
unpackage/dist/dev/mp-weixin/pages/cust/my.js

@@ -109,6 +109,9 @@ try {
     uTag: function () {
       return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-tag/u-tag */ "uni_modules/vk-uview-ui/components/u-tag/u-tag").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-tag/u-tag.vue */ 477))
     },
+    uGap: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-gap/u-gap */ "uni_modules/vk-uview-ui/components/u-gap/u-gap").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue */ 435))
+    },
     uPopup: function () {
       return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-popup/u-popup */ "uni_modules/vk-uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue */ 372))
     },
@@ -322,6 +325,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
 
 var that;
 var _default = {

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/cust/my.json

@@ -5,6 +5,7 @@
     "u-empty": "/uni_modules/vk-uview-ui/components/u-empty/u-empty",
     "u-icon": "/uni_modules/vk-uview-ui/components/u-icon/u-icon",
     "u-tag": "/uni_modules/vk-uview-ui/components/u-tag/u-tag",
+    "u-gap": "/uni_modules/vk-uview-ui/components/u-gap/u-gap",
     "u-popup": "/uni_modules/vk-uview-ui/components/u-popup/u-popup",
     "u-input": "/uni_modules/vk-uview-ui/components/u-input/u-input",
     "u-divider": "/uni_modules/vk-uview-ui/components/u-divider/u-divider",

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/cust/my.wxml


+ 199 - 30
unpackage/dist/dev/mp-weixin/pages/cust/myrecordedit.js

@@ -109,17 +109,26 @@ try {
     uInput: function () {
       return Promise.all(/*! import() | uni_modules/vk-uview-ui/components/u-input/u-input */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-input/u-input.vue */ 428))
     },
+    uImage: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-image/u-image */ "uni_modules/vk-uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-image/u-image.vue */ 358))
+    },
     uGap: function () {
       return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-gap/u-gap */ "uni_modules/vk-uview-ui/components/u-gap/u-gap").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue */ 435))
     },
     uButton: function () {
       return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-button/u-button */ "uni_modules/vk-uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-button/u-button.vue */ 337))
     },
+    uToast: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-toast/u-toast */ "uni_modules/vk-uview-ui/components/u-toast/u-toast").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-toast/u-toast.vue */ 470))
+    },
     uSelect: function () {
       return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-select/u-select */ "uni_modules/vk-uview-ui/components/u-select/u-select").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-select/u-select.vue */ 463))
     },
-    uToast: function () {
-      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-toast/u-toast */ "uni_modules/vk-uview-ui/components/u-toast/u-toast").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-toast/u-toast.vue */ 470))
+    uPopup: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-popup/u-popup */ "uni_modules/vk-uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue */ 372))
+    },
+    uTag: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-tag/u-tag */ "uni_modules/vk-uview-ui/components/u-tag/u-tag").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-tag/u-tag.vue */ 477))
     },
   }
 } catch (e) {
@@ -143,6 +152,20 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
+  if (!_vm._isMounted) {
+    _vm.e0 = function ($event) {
+      _vm.groupTypeSelectShow = true
+    }
+    _vm.e1 = function ($event) {
+      _vm.propertySelectShow = true
+    }
+    _vm.e2 = function ($event) {
+      _vm.propertySelectShow = false
+    }
+    _vm.e3 = function ($event) {
+      _vm.propertySelectShow = false
+    }
+  }
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -178,10 +201,71 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 /* WEBPACK VAR INJECTION */(function(uni) {
 
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
+var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
+var _utils = __webpack_require__(/*! @/utils */ 65);
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 //
 //
 //
@@ -210,8 +294,18 @@ exports.default = void 0;
 var _default = {
   data: function data() {
     return {
-      curImgUrl: '',
+      groupTypeSelectShow: false,
+      groupTypeSelectList: [],
+      estateList: [],
+      areaTypeObj: {},
+      userInfo2: {},
+      curEstateName: '',
+      propertySelectShow: false,
+      imgArr: [],
       form: {
+        estate_id: '',
+        estate_name: '',
+        cur_time: '',
         record_remark: null
       },
       customer_id: null,
@@ -220,15 +314,36 @@ var _default = {
           required: true,
           message: '备注不能为空',
           trigger: ['change']
+        }],
+        cur_time: [{
+          required: true,
+          message: "提醒时间不能为空",
+          trigger: ['blur', 'change']
         }]
       },
-      remarkTips: '请输入:购房预算(总价/均价/面积段)~现居住区域~现居住产品/面积段~工作类型~购房需求/关注点~已经看过的房源情况',
-      propertySelectShow: false,
-      propertySelectList: []
+      remarkTips: '请输入'
     };
   },
   onLoad: function onLoad(data) {
+    var _this = this;
     this.customer_id = data.id;
+    var userInfo2 = this.userInfo2 = uni.getStorageSync('MD_userInfo2');
+    var dictObj = uni.getStorageSync('MD_dict');
+    this.areaTypeObj = (0, _utils.arrToObj)(dictObj.area_type);
+    this.getEstateList();
+    this.form.group_type = userInfo2.group_type || '1';
+    var list = dictObj.group_type || [];
+    var groupTypeSelectList = [];
+    list.forEach(function (item) {
+      if (item.val == userInfo2.group_type) {
+        _this.form.groupTypeName = item.key;
+      }
+      groupTypeSelectList.push({
+        value: item.val,
+        label: item.key
+      });
+    });
+    this.groupTypeSelectList = [].concat(groupTypeSelectList);
   },
   created: function created() {},
   // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
@@ -236,42 +351,96 @@ var _default = {
     this.$refs.uForm.setRules(this.rules);
   },
   methods: {
-    // // 选择所属项目回调
-    // propertySelectConfirm(e) {
-    // 	e.map((val, index) => {
-    // 		this.form.estate_id = val.value;
-    // 		this.form.estate_name = val.label;
-    // 	});
-    // },
+    groupTypeSelectConfirm: function groupTypeSelectConfirm(e) {
+      var _this2 = this;
+      e.map(function (val, index) {
+        _this2.form.group_type = val.value;
+        _this2.form.groupTypeName = val.label;
+      });
+    },
+    getEstateList: function getEstateList() {
+      var _this3 = this;
+      uni.api.estate.apiestatelist({
+        page_size: 100,
+        report_open: 1,
+        estate_name: this.curEstateName
+      }).then(function (res) {
+        var list = res.list || [];
+        _this3.estateList = (0, _toConsumableArray2.default)(list);
+      });
+    },
+    listItemHandle: function listItemHandle(val) {
+      this.form.estate_id = val.estate_id;
+      this.form.estate_name = val.estate_name;
+    },
     addImg: function addImg() {
-      var token = uni.getStorageSync('MD_token');
+      var _this4 = this;
+      this.uploadComImg(function (arr) {
+        _this4.imgArr = [].concat((0, _toConsumableArray2.default)(_this4.imgArr), (0, _toConsumableArray2.default)(arr));
+        _this4.imgArr = (0, _toConsumableArray2.default)(imgArr);
+      }, 9);
+    },
+    uploadComImg: function uploadComImg(bc, count, moreStr) {
       var that = this;
       uni.chooseImage({
-        count: 1,
+        count: count ? count : 1,
         // 默认9
         sizeType: ['compressed'],
+        // original
         sourceType: ['album', 'camera'],
         success: function success(res) {
           var tempFilePaths = res.tempFilePaths;
-          uni.uploadFile({
-            url: uni.baseUrl + 'api/upload/cloud',
-            filePath: tempFilePaths[0],
-            name: 'upload',
-            formData: {
-              'token': token
-            },
-            success: function success(res) {
-              var cData = JSON.parse(res.data);
-              that.curImgUrl = cData.data.url;
-            }
-          });
+          if (tempFilePaths.length > 0) {
+            var imgBcArr = [];
+            tempFilePaths.forEach(function (p, i) {
+              that.diyUploadFile(p, moreStr).then(function (url) {
+                imgBcArr.push(url);
+                if (bc && imgBcArr.length === tempFilePaths.length) {
+                  bc(imgBcArr);
+                }
+              });
+            });
+          }
         }
       });
     },
+    diyUploadFile: function diyUploadFile(filePath, moreStr) {
+      return new Promise(function (resolve, reject) {
+        var token = uni.getStorageSync('MD_token');
+        var url = uni.baseUrl + 'api/upload/cloud';
+        // if (moreStr === 'noSign') url = uni.baseUrl + 'api/upload/cloud'
+        uni.uploadFile({
+          url: url,
+          filePath: filePath,
+          name: 'upload',
+          formData: {
+            'token': token
+          },
+          success: function success(res) {
+            var cData = JSON.parse(res.data);
+            var curImg = cData.data.url || '';
+            resolve(curImg);
+          }
+        });
+      });
+    },
+    delImg: function delImg(index) {
+      var imgArr = (0, _toConsumableArray2.default)(this.imgArr);
+      imgArr.splice(index, 1);
+      this.imgArr = (0, _toConsumableArray2.default)(imgArr);
+    },
+    previewImageHandle: function previewImageHandle(current, arr) {
+      uni.previewImage({
+        current: current,
+        urls: this.imgArr
+      });
+    },
     submitHandle: function submitHandle() {
-      var _this = this;
+      var _this5 = this;
       var that = this;
       this.$refs.uForm.validate(function (valid) {
+        console.log(valid);
+        return;
         if (valid) {
           // 验证成功
           var apiStr = 'apiprivaterecordadd';
@@ -279,7 +448,7 @@ var _default = {
             record_remark: that.form.record_remark,
             customer_id: that.customer_id
           };
-          if (that.curImgUrl) params.record_img = that.curImgUrl;
+          if (that.imgArr) params.record_img = that.imgArr.join(',');
           if (that.isEdit) {
             apiStr = 'apiprivaterecordedit';
             params.id = that.form.id;
@@ -299,7 +468,7 @@ var _default = {
               uni.$msgConfirm('添加跟进记录成功,是否前往列表?', function () {
                 uni.navigateBack();
               }, function () {
-                _this.form = {
+                _this5.form = {
                   record_remark: null
                 };
               });

+ 4 - 1
unpackage/dist/dev/mp-weixin/pages/cust/myrecordedit.json

@@ -5,9 +5,12 @@
     "u-form": "/uni_modules/vk-uview-ui/components/u-form/u-form",
     "u-form-item": "/uni_modules/vk-uview-ui/components/u-form-item/u-form-item",
     "u-input": "/uni_modules/vk-uview-ui/components/u-input/u-input",
+    "u-image": "/uni_modules/vk-uview-ui/components/u-image/u-image",
     "u-gap": "/uni_modules/vk-uview-ui/components/u-gap/u-gap",
     "u-button": "/uni_modules/vk-uview-ui/components/u-button/u-button",
+    "u-toast": "/uni_modules/vk-uview-ui/components/u-toast/u-toast",
     "u-select": "/uni_modules/vk-uview-ui/components/u-select/u-select",
-    "u-toast": "/uni_modules/vk-uview-ui/components/u-toast/u-toast"
+    "u-popup": "/uni_modules/vk-uview-ui/components/u-popup/u-popup",
+    "u-tag": "/uni_modules/vk-uview-ui/components/u-tag/u-tag"
   }
 }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/cust/myrecordedit.wxml


+ 94 - 6
unpackage/dist/dev/mp-weixin/pages/cust/myrecordedit.wxss

@@ -116,14 +116,102 @@
 }
 .scoped-more-img {
   padding-top: 30rpx;
-  color: #2d8cf0;
-  text-decoration: underline;
 }
-.scoped-more-img .t {
-  padding-bottom: 20rpx;
+.scoped-more-img .si-op {
+  display: inline-block;
+  vertical-align: middle;
+  width: 150rpx;
+  height: 150rpx;
+  margin-right: 30rpx;
+  margin-bottom: 30rpx;
+  position: relative;
+  border: 1PX solid #f2f2f2;
+}
+.scoped-more-img .si-op .img {
+  width: 150rpx;
+  height: 150rpx;
+}
+.scoped-more-img .si-op .i {
+  position: absolute;
+  top: -20rpx;
+  right: -20rpx;
+  width: 40rpx;
+  height: 40rpx;
+  z-index: 9;
+}
+.scoped-estate-popup {
+  height: 100%;
+  padding-bottom: 100rpx;
+}
+.scoped-estate-popup .popup-body {
+  box-sizing: border-box;
+  border-bottom: 1PX solid #dcdcdc;
+}
+.scoped-estate-list .sel-item {
+  display: flex;
+  border-bottom: 1PX solid #dcdcdc;
+  padding: 20rpx;
 }
-.scoped-more-img .img {
+.scoped-estate-list .sel-item.cur {
+  background: #369af7;
+  border-radius: 10rpx;
+  overflow: hidden;
+}
+.scoped-estate-list .sel-item.cur .img {
+  opacity: .6;
+}
+.scoped-estate-list .sel-item.cur .p1 {
+  color: #fff;
+}
+.scoped-estate-list .sel-item.cur .p3 {
+  color: #fff;
+}
+.scoped-estate-list .sel-left {
+  width: 180rpx;
+  border-radius: 10rpx;
+}
+.scoped-estate-list .sel-left .img {
+  width: 180rpx;
+  height: 120rpx;
+  border-radius: 10rpx;
+}
+.scoped-estate-list .sel-right {
+  margin-left: 20rpx;
+}
+.scoped-estate-list .sel-right .p1 {
+  font-size: 30rpx;
+  font-weight: bold;
+  margin-bottom: 10rpx;
+}
+.scoped-estate-list .sel-right .p2 {
+  margin-bottom: 10rpx;
+}
+.scoped-estate-list .sel-right .p3 {
+  color: #369af7;
+  font-size: 24rpx;
+  font-weight: bold;
+}
+.scoped-popup-header-input {
+  position: fixed;
+  width: 90%;
+  display: flex;
+  border-bottom: 1PX solid #dcdcdc;
+}
+.scoped-popup-header-input .input {
+  flex: 1;
+  padding-left: 20rpx;
+  height: 80rpx;
+}
+.scoped-popup-header-input .input .u-input__input {
+  height: 80rpx;
+}
+.scoped-popup-header-input .b {
   width: 200rpx;
-  height: 200rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  background: #2d8cf0;
+  color: #fff;
+  text-align: center;
+  margin-left: 20rpx;
 }
 

BIN
unpackage/dist/dev/mp-weixin/static/icon_g_close.png


BIN
unpackage/dist/dev/mp-weixin/static/icon_upload_img.png


Vissa filer visades inte eftersom för många filer har ändrats