Browse Source

用户端绑定楼盘接口完成,细节未完善,商品详情对接,销售端接口完善

huangzhe 3 years ago
parent
commit
79b2a712ff

+ 4 - 0
src/components/page-component/app-area-picker/app-area-picker.vue

xqd xqd
@@ -5,6 +5,7 @@
 			class="box-grow-1 area-picker-left"
 			mode="multiSelector"
 			@change="bindMultiPickerChange"
+			@cancel="bindMultiPickerCancel"
 			@columnchange="bindMultiPickerColumnChange"
 			:value="multiIndex"
 			range-key="name"
@@ -203,6 +204,9 @@ export default {
 			[this.multiIndex, this.place] = [e.detail.value, place];
 			this.setEvent(list);
 		},
+		bindMultiPickerCancel(){
+			this.$emit('cancel');
+		},
 
 		setEvent: function(list, status = true) {
 			let data = {

+ 7 - 2
src/components/page-component/index/app-nav-bar.vue

xqd xqd xqd
@@ -14,7 +14,7 @@
                         <view v-if="showLeftIcon">
 							<template v-if="xStyle==5">
 								<view class="main-left cross-center hxj-area" @click="leftClick">
-									九林语<image src="https://t17.9026.com/web/statics/image/index/arrow-down.png" mode=""></image>
+									<view class="tt t-omit">{{selectedProperties.name}}</view><image src="https://t17.9026.com/web/statics/image/index/arrow-down.png" mode=""></image>
 								</view>
 							</template>
 							<template v-else>
@@ -130,7 +130,8 @@ export default {
             statusBarHeight: state => state.gConfig.systemInfo.statusBarHeight,
             mBarHeight: state => state.gConfig.mBarHeight,
             appImg: state => state.mallConfig.__wxapp_img.mall,
-            mallNavbar: state => state.mallConfig.navbar
+            mallNavbar: state => state.mallConfig.navbar,
+			selectedProperties: state => state.user.selectedProperties
         }),
         maxWidth() {
             return () => {
@@ -278,9 +279,13 @@ export default {
 
 <style lang="scss" scoped>
 	.hxj-area{
+		width: 260rpx;
 		font-size: 28rpx;
 		font-weight: 500;
 		color: #FFFFFF;
+		.tt{
+			max-width: 240rpx;
+		}
 		image{
 			width: 24rpx;
 			height: 20rpx;

+ 3 - 1
src/core/apiUrl.js

xqd xqd
@@ -24,7 +24,8 @@ const apiUrl = {
 		
 		// hxj新增
 		binding_estate:'api/estate/binding-estate-sale',
-		sale_list:'api/estate/sale-list'
+		sale_list:'api/estate/sale-list',
+		select_master_estate:'api/estate/select-master-estate'
     },
     finance: {
         cash: 'api/finance/cash',
@@ -663,6 +664,7 @@ const apiUrl = {
 		cat_list:'plugin/composition/api/index/cat-list',
 		list:'plugin/composition/api/index/list',
 		info:'plugin/composition/api/index/info',
+		collect:'plugin/composition/api/index/collect',
 		//
     },
     favorite: {

+ 4 - 1
src/pages/case/hot_sale_project.vue

xqd xqd
@@ -19,7 +19,7 @@
 			<view class="item" v-for="(item,index) in CompositionList" :key="index" @click="goPage(item.id)">
 				<view class="main-between img">
 					<view style="width: 419rpx;height: 281rpx;">
-						<image style="width: 419rpx;height: 281rpx;" :src="item.banner_imgs[0]" mode=""></image>
+						<image style="width: 419rpx;height: 281rpx;" :src="'https://img0.baidu.com/it/u=2817072178,3148297616&fm=26&fmt=auto'" mode=""></image>
 					</view>
 					<view style="width: 206rpx;">
 						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1]?item.banner_imgs[1]:'https://img0.baidu.com/it/u=3232043632,3119790085&fm=26&fmt=auto'" mode=""></image>
@@ -94,6 +94,9 @@
 				}).then(res=>{
 					if(res.code===0){
 						this.CompositionList=res.data.list
+						this.CompositionList[0].id=18
+						this.CompositionList[0].price=688.00
+						this.CompositionList[1].id=20
 					}
 				})
 			}

+ 35 - 60
src/pages/case/projectInfo.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -6,8 +6,8 @@
 				:hasHeight="false"></app-nav-bar>
 
 			<!--商品轮播图-->
-			<app-goods-banner v-bind:pic-list="goods.pic_url" v-bind:share="goods.share"
-				v-bind:video-url="goods.video_url" v-bind:goods_id="goodsId" :isCart="true"></app-goods-banner>
+			<app-goods-banner :pic-list="goods.pic_url" :share="goods.share"
+				:video-url="goods.video_url" :goods_id="goodsId" :isCart="true"></app-goods-banner>
 			<!-- 套装内商品 -->
 			<view style="background-color: #fff;">
 				<view class="link ">
@@ -19,31 +19,32 @@
 					</view>
 				</view>
 				<hxj-scroll-list :itemWidth="'168rpx'" :itemHeight="'168rpx'" :list="list"></hxj-scroll-list>
-				<hxj-bd-info :theme="getTheme" :name="name" :price="price" :original-price="original_price"
-					:sales="sales" :goods-id="goodsId" :extra-quick-share="extra_quick_share"
+				<hxj-bd-info :theme="getTheme" :name="compositionList.name" :price="compositionList.price" :original-price="compositionList.price"
+					:sales="compositionList.sale_num+compositionList.virtual_sale_num" :goods-id="goodsId" :extra-quick-share="extra_quick_share"
 					:app-share-pic="app_share_pic ? app_share_pic : goods.pic_url[0].pic_url"
 					:app-share-title="app_share_title ? app_share_title : name"
 					:poster-config="poster_config + `&goods_id=` + goodsId"
 					:poster-generate="poster_generate + `&goods_id=` + goodsId" :has-poster-nav="true" :goods="goods"
-					@share="hShareAppMessage" @quickShare="quickShare" @receive="receive"></hxj-bd-info>
+					@share="hShareAppMessage" @quickShare="quickShare" @receive="receive">
+				</hxj-bd-info>
 				<view class="hxj-goods-list" :style="{ height: isOpen ? 'auto' : '270rpx' }">
 					<view class="main-between" style="width: 560rpx;">
 						<view class="title">套装内商品</view>
 						<view class="title">数量</view>
 					</view>
 					<view class="main-between item"
-						v-for="(item, index) in ['ins风高档皮质沙发','歌尚雅新款单人沙发布艺小户型客厅','梵瑟 北欧全实木沙发组合新中式现代简约','梵瑟 北欧全实木沙发组合新中式现代简约','客厅家用茶几桌轻奢现代小户型']"
+						v-for="(item, index) in list"
 						:key="index">
 						<view class="main-between" style="width: 560rpx;">
-							<view class="name t-omit">{{item}}</view>
-							<view class="num">x1</view>
+							<view class="name t-omit">{{item.name}}</view>
+							<view class="num">x{{item.goods_num}}</view>
 						</view>
-						<view class="zk cropss-center" v-if="index === 1 && isOpen === false" @click="isOpen = true">
+						<view class="zk cropss-center" v-if="index === 1 &&list.length>2 && isOpen === false" @click="isOpen = true">
 							展开
 							<image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode="">
 							</image>
 						</view>
-						<view class="zk cropss-center" v-if="index === 4 && isOpen === true" @click="isOpen = false">
+						<view class="zk cropss-center" v-if="index===list.length-1 && isOpen === true" @click="isOpen = false">
 							收起
 							<image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode="">
 							</image>
@@ -85,9 +86,9 @@
 							<!-- 客服组件 -->
 							<bd-service :name="name" :url="sendPath"></bd-service>
 						</template>
-						<view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="setFavorite">
+						<view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="setCollect">
 							<image class="bd-icon" :src="
-									favorite
+									compositionList.is_collect
 										? 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite-active.png'
 										: 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite.png'
 								"></image>
@@ -162,10 +163,6 @@
 					</template>
 				</view>
 			</view>
-			<!--快捷导航-->
-			<!-- <app-quick-navigation></app-quick-navigation> -->
-			<u-attr v-if="is_negotiable === 0 && exchangeStatus == null && goods && goods.type" v-model="attrShow"
-				:goods="goods" :theme="getTheme" :checked="checked" @check="check" @update="updateCartNumber"></u-attr>
 		</template>
 		<app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
 	</app-layout>
@@ -228,31 +225,9 @@
 		data() {
 			return {
 				isCouponShow: false,
-				list: [{
-						image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634283687206.png',
-						title: '',
-						tag: '',
-						link: ''
-					},
-					{
-						image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634284372084.png',
-						title: '',
-						tag: '',
-						link: ''
-					},
-					{
-						image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634283667210.png',
-						title: '',
-						tag: '',
-						link: ''
-					},
-					{
-						image: 'https://t17.9026.com/web/statics/image/index/2.png',
-						title: '',
-						tag: ''
-					}
-				],
+				list: [],
 				isOpen: false, //hxj套装内商品是否展开
+				compositionList:[], //套餐详情
 
 				showClose: false,
 				is_open: 0,
@@ -544,11 +519,20 @@
 				this.$request({
 					url: this.$api.composition.info,
 					data: {
-						composition_id: id
+						composition_id: 3
 					},
 					method: 'post'
 				}).then(res => {
-
+					if(res.code===0){
+						this.compositionList=res.data
+						for (let i = 0; i < this.compositionList.compositionGoods.length; i++) {
+							let image=this.compositionList.compositionGoods[i].goods.cover_pic
+							let id=this.compositionList.compositionGoods[i].goods.id
+							let name=this.compositionList.compositionGoods[i].goods.name
+							let goods_num=this.compositionList.compositionGoods[i].goods_num
+							this.list.push({image,link:`/pages/goods/goods?id=${id}`,name,goods_num})
+						}
+					}
 				})
 				return new Promise((resolve, reject) => {
 					this.$showLoading();
@@ -604,11 +588,6 @@
 									template_message_list,
 									is_finish_sell
 								} = response.data.goods;
-								uni.setNavigationBarTitle({
-									title: name
-								});
-
-								this.name = name;
 								this.app_share_pic = app_share_pic;
 								this.app_share_title = app_share_title;
 								this.goods = response.data.goods;
@@ -697,21 +676,17 @@
 					url: '/pages/index/index'
 				});
 			},
-			setFavorite() {
-				let url = this.$api.user.favorite_add;
-				let favorite = true;
-				if (this.favorite) {
-					url = this.$api.user.favorite_remove;
-					favorite = false;
-				}
-				this.favorite = favorite;
+			setCollect() {
 				this.$request({
-					url: url,
+					url: this.$api.composition.collect,
 					data: {
-						goods_id: this.goodsId
-					}
+						composition_id: this.compositionList.id
+					},
+					method:'post'
 				}).then(response => {
-					if (response.code === 0) {} else {
+					if (response.code === 0) {
+						this.compositionList.is_collect==0?this.compositionList.is_collect=1:this.compositionList.is_collect=0
+					} else {
 						uni.showModal({
 							title: '提示',
 							content: response.msg,
@@ -741,7 +716,7 @@
 					return;
 				}
 				uni.navigateTo({
-					url: '/plugins/composition/detail/detail?composition_id=3'
+					url: `/plugins/composition/detail/detail?composition_id=${this.compositionList.id}`
 				});
 				// this.attrShow = true;
 				console.log('结束');

+ 55 - 51
src/pages/index/binding/binding.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="properties_list">
-			<view class="item main-left" v-for="(item,index) in dataList" :key="index">
+			<view class="item main-left" v-for="(item,index) in dataList" :key="index" @click="selectMasterEstate(index,item.id)">
 				<view class="left">
 					<image :src="item.cover_img" mode=""></image>
 				</view>
@@ -13,6 +13,7 @@
 				<image class="bg" src="https://t17.9026.com/web/statics/image/sale/properties_gradual.png" mode="">
 				</image>
 			</view>
+			<AppNoData v-if="dataList.length===0" title="您还未绑定任何楼盘"></AppNoData>
 		</view>
 		<!-- <view class="main-between cross-center lp">
 			<view class="name">世龙广场</view>
@@ -20,7 +21,7 @@
 		</view> -->
 		<view class="form-box">
 			<view class="title">楼盘信息</view>
-			<AppAreaPicker @customevent="areaEvent">
+			<AppAreaPicker @customevent="areaEvent" :multiIndex="multiIndex" @cancel="areaCancel">
 				<view class="main-between cross-center item" style="padding-right: 8rpx;">
 					<view class="title_1">区域信息</view>
 					<view class="main-right cross-center">
@@ -69,16 +70,20 @@
 </template>
 
 <script>
+	import {mapMutations} from 'vuex'
+	import AppNoData from '@/components/page-component/app-no-goods/app-no-goods.vue'
 	import AppAreaPicker from "@/components/page-component/app-area-picker/app-area-picker.vue"
 	export default {
 		components: {
-			AppAreaPicker
+			AppAreaPicker,
+			AppNoData,
 		},
 		data() {
 			return {
 				name: '',
 				region: '',
 				regionId:{},
+				multiIndex:[2,3,5],
 				nature: '',
 				sale: '',
 				
@@ -87,26 +92,7 @@
 
 				natureList: ['住宅用房', '非住宅用房'],
 
-				dataList: [{
-					address: "中国四川省成都市金牛区蜀跃路",
-					area_id: "1050",
-					city_id: "0",
-					cover_img: "https://swdzshopv4.oss-cn-chengdu.aliyuncs.com/uploads/mall10000/20210811/bf85fea4246c07b25c2e6e2c79c3602b.jpg",
-					created_at: "2021-12-07 11:31:07",
-					deleted_at: "0000-00-00 00:00:00",
-					details: "<p>万达广场详细描述万达广场详细描述万达广场详细描述万达广场详细描述万达广场详细描述万达广场详细描述万达广场详细描述</p>",
-					district_id: "0",
-					id: "1",
-					is_delete: "0",
-					latitude: "30.709999",
-					longitude: "104.013252",
-					mall_id: "10000",
-					name: "金牛区万科金域西岭",
-					property: "1",
-					province_id: "0",
-					status: "1",
-					updated_at: "2021-12-16 17:56:22",
-				}]
+				dataList: []
 			};
 		},
 		onShow() {
@@ -115,44 +101,38 @@
 
 			'estateInfo' in currPage.$vm ? this.name = currPage.$vm.estateInfo.name : ''
 			'estateInfo' in currPage.$vm ? this.estate_id = currPage.$vm.estateInfo.id : ''
+			'estateInfo' in currPage.$vm ? this.multiIndex = currPage.$vm.estateInfo.multiIndex : ''
 			'saleInfo' in currPage.$vm ? this.sale = currPage.$vm.saleInfo.name : ''
 			'saleInfo' in currPage.$vm ? this.sale_id = currPage.$vm.saleInfo.id : ''
-
-			console.log(currPage.$vm)
 		},
 		onLoad() {
-
+			this.getDate(1,'')
 		},
 		methods: {
 			addmyEstate() {
-				if(this.name==='' || this.region===''  || this.sale===''){
+				if(this.name===''  || this.sale===''){
 					uni.showToast({
 						title:'请完整填写信息',
 						icon:'none'
 					})
 					return
 				}
-				let qwe = {
-					address: "中国四川省成都市武侯区成汉南路86号",
-					area_id: "0",
-					city_id: "0",
-					cover_img: "https://swdzshopv4.oss-cn-chengdu.aliyuncs.com/uploads/mall10000/20211213/0faa8082fbe997a00dbff8ef482f98be.jpg",
-					created_at: "2021-12-13 21:17:29",
-					deleted_at: "2021-12-16 17:56:22",
-					details: "<p>测试测试测试</p>",
-					district_id: "0",
-					id: "2",
-					is_delete: "0",
-					latitude: "30.586587",
-					longitude: "104.054303",
-					mall_id: "10000",
-					name: "测试测试测试测试",
-					property: "2",
-					province_id: "0",
-					status: "1",
-					updated_at: "2021-12-16 17:56:22",
-				}
-				this.dataList.push(qwe)
+				this.$request({
+					url:this.$api.index.binding_estate,
+					data:{
+						estate_id:this.estate_id,
+						sale_id:this.sale_id,
+					},
+					method:'post'
+				}).then(res=>{
+					if(res.code===0){
+						this.getDate(1,'')
+					}
+					uni.showToast({
+						title:res.msg,
+						icon:'none',
+					})
+				})
 			},
 			areaEvent(data) {
 				if (data) {
@@ -164,13 +144,16 @@
 					this.selectBuild()
 				}
 			},
+			areaCancel(){
+				this.region=''
+				this.regionId={}
+			},
 			getDate(page, name) {
 				this.$request({
 					url: this.$api.sale.estate_list,
 					data: {
 						page: page,
-						is_myself: 1,
-						name: name,
+						is_user_myself: 1,
 					},
 					method: 'post'
 				}).then(res => {
@@ -179,6 +162,27 @@
 					}
 				})
 			},
+			...mapMutations('user',{
+				'selectedProperties':'selectedProperties'
+			}),
+			selectMasterEstate(index,estate_id){
+				this.$request({
+					url:this.$api.index.select_master_estate,
+					data:{
+						estate_id:estate_id
+					},
+					method:'post'
+				}).then(res=>{
+					uni.showToast({
+						icon:res.code===0?'success':'none',
+						title:res.msg
+					})
+					if(res.code===0){
+						this.selectedProperties(this.dataList[index])
+						uni.navigateBack()
+					}
+				})
+			},
 			selectBuild() {
 				uni.navigateTo({
 					url: `/pages/sale/properties/addProperties?regionId=${JSON.stringify(this.regionId)}`
@@ -186,7 +190,7 @@
 			},
 			selectSale() {
 				uni.navigateTo({
-					url: `/pages/index/binding/bindingSale?estate_id=${this.estate_id}`
+					url: `/pages/index/binding/bindingSale?estate_id=${this.estate_id}&name=${this.name}`
 				})
 			},
 			bindPickerNature(e) {

+ 9 - 2
src/pages/index/binding/bindingSale.vue

xqd xqd xqd xqd
@@ -8,7 +8,7 @@
 		
 		<view class="main">
 			<view class="main-between cross-center" style="height: 100rpx;">
-				<view class="title">世龙广场销售人员</view>
+				<view class="title t-omit">{{estateName}}销售人员</view>
 				<view class="main-right cross-center"><text class="pla">更多</text><image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode=""></image></view>
 			</view>
 			<view class="main-between cross-center item" v-for="(item,index) in dataList" :key="index" @click="selectSale(index,item.id,item.salesperson.name)">
@@ -21,6 +21,7 @@
 				</view>
 				<image v-show="selectSaleIndex===index" style="width: 36rpx;height: 36rpx;" src="https://t17.9026.com/web/statics/image/index/select_sale.png" mode=""></image>
 			</view>
+			<AppNoData v-if="dataList.length===0" title="暂无销售人员"></AppNoData>
 		</view>
 		<view style="height: 150rpx;"></view>
 		<button type="default" @click="bindingSale" :class="{'add':true, 'allow-add':selectSaleIndex!==-1, 'not-add':selectSaleIndex===-1}" :disabled="fasle">确认绑定</button>
@@ -28,16 +29,21 @@
 </template>
 
 <script>
+	import AppNoData from '@/components/page-component/app-no-goods/app-no-goods.vue'
 	export default {
+		components:{
+			AppNoData
+		},
 		data() {
 			return {
 				selectSaleIndex:-1,
 				
 				dataList:[],
+				estateName:'',
 			};
 		},
 		onLoad(option) {
-			console.log(option.estate_id)
+			this.estateName=option.name
 			this.$request({
 				url:this.$api.index.sale_list,
 				data:{
@@ -132,6 +138,7 @@
 		padding: 20rpx 42rpx 0 30rpx;
 	}
 	.title{
+		width: 500rpx;
 		font-size: 34rpx;
 		font-weight: bold;
 		color: #222222;

+ 88 - 58
src/pages/sale/cusmter/addCustomer.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -8,7 +8,9 @@
 			<view class="customerInfo">
 				<view class="top">基本信息</view>
 				<view class="head" @click="uploadHead">
-					<image class="bg" :src="avatar===''?'https://t17.9026.com/web/statics/image/index/headbg.png':avatar" mode=""></image>
+					<image class="bg"
+						:src="avatar===''?'https://t17.9026.com/web/statics/image/index/headbg.png':avatar" mode="">
+					</image>
 					<image class="camera" src="https://t17.9026.com/web/statics/image/index/camera.png" mode=""></image>
 				</view>
 				<view class="main-left cross-center linp border_bottom">
@@ -22,26 +24,34 @@
 			</view>
 		</view>
 		<view class="oinfo">
-			<view class="main-left cross-center linp border_bottom">
+			<view class="main-between cross-center linp border_bottom">
 				<view class="field" style="font-weight: bold;">楼盘信息</view>
+				<view class="main-between" style="width: 210rpx;height: 100%;">
+					<view class="cross-center curd-btn">
+						<image src="../../../static/image/sale/tianjia.png" mode=""></image>添加
+					</view>
+					<view class="cross-center curd-btn">
+						<image src="../../../static/image/sale/shanchu.png" mode=""></image>删除
+					</view>
+				</view>
 			</view>
 			<picker mode="region" @change="bindPickerRegion">
-			<view class="main-left cross-center linp border_bottom">
-				<view class="field">区域信息</view>
-				<input type="text" v-model="region" placeholder="请选择区域" placeholder-style="font-size:28rpx" />
-			</view>
+				<view class="main-left cross-center linp border_bottom">
+					<view class="field">区域信息</view>
+					<input type="text" v-model="region" placeholder="请选择区域" placeholder-style="font-size:28rpx" />
+				</view>
 			</picker>
 			<view class="main-left cross-center linp border_bottom" @click="selectEstate">
 				<view class="field">楼盘名称</view>
-				<input type="text" value="" placeholder="请选择楼盘" placeholder-style="font-size:28rpx"/>
+				<input type="text" value="" placeholder="请选择楼盘" placeholder-style="font-size:28rpx" />
 			</view>
-			<view class="main-left cross-center linp border_bottom">
+			<!-- 			<view class="main-left cross-center linp border_bottom">
 				<view class="field">楼盘性质</view>
 				<input type="text" value="" placeholder="请选择楼盘性质" placeholder-style="font-size:28rpx"/>
-			</view>
+			</view> -->
 			<view class="main-left cross-center linp border_bottom">
 				<view class="field">楼盘户号</view>
-				<input type="text" value="" placeholder="请输入楼盘户号" placeholder-style="font-size:28rpx"/>
+				<input type="text" value="" placeholder="请输入楼盘户号" placeholder-style="font-size:28rpx" />
 			</view>
 			<button type="default" class="complete">完成</button>
 		</view>
@@ -55,19 +65,17 @@
 	export default {
 		data() {
 			return {
-				avatar:'',
-				name:'',
-				mobile:'',
-				
-				estateInfoList:[
-					{
-						estate_id:'',
-						estate_no:'',
-						room_no:'',
-					}
-				],
-				
-				region:'',
+				avatar: '',
+				name: '',
+				mobile: '',
+
+				estateInfoList: [{
+					estate_id: '',
+					estate_no: '',
+					room_no: '',
+				}],
+
+				region: '',
 			};
 		},
 		onShow() {
@@ -75,35 +83,35 @@
 			var currPage = pages[pages.length - 1]; //当前页面
 			console.log(currPage.$vm.estateInfo)
 		},
-		methods:{
+		methods: {
 			bindPickerRegion(e) {
 				this.region = e.target.value.join('')
 			},
-			uploadHead(){
+			uploadHead() {
 				uni.chooseImage({
-				    count: 1, 
-				    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-				    sourceType: ['album','camera'], //从相册选择
-				    success:  (res)=> {
+					count: 1,
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
 						console.log(res);
-				        console.log(JSON.stringify(res.tempFilePaths));
+						console.log(JSON.stringify(res.tempFilePaths));
 						uploadFile({
-						    url: this.$api.upload.file,
-						    filePath: res.tempFilePaths[0],
-						    fileType: 'image',
-						    fileName: ''
+							url: this.$api.upload.file,
+							filePath: res.tempFilePaths[0],
+							fileType: 'image',
+							fileName: ''
 						}).then(res1 => {
 							console.log(JSON.parse(res1.data))
-						    if(JSON.parse(res1.data).code===0){
-								this.avatar=JSON.parse(res1.data).data.url
+							if (JSON.parse(res1.data).code === 0) {
+								this.avatar = JSON.parse(res1.data).data.url
 							}
 						})
-				    }
+					}
 				});
 			},
-			selectEstate(){
+			selectEstate() {
 				uni.navigateTo({
-					url:'/pages/sale/properties/addProperties?type=addCustomer'
+					url: '/pages/sale/properties/addProperties?type=addCustomer'
 				})
 			}
 		}
@@ -111,7 +119,7 @@
 </script>
 
 <style lang="scss" scoped>
-	.addlp{
+	.addlp {
 		width: 606rpx;
 		height: 90rpx;
 		border: 1rpx solid #A18353;
@@ -121,7 +129,8 @@
 		color: #A18353;
 		margin-top: 39rpx;
 	}
-	.complete{
+
+	.complete {
 		width: 606rpx;
 		height: 90rpx;
 		background: #A18353;
@@ -131,38 +140,53 @@
 		color: #FFFFFF;
 		margin-top: 36rpx;
 	}
-	.oinfo{
+
+	.oinfo {
 		width: 678rpx;
 		height: auto;
 		background: #FEFEFE;
 		border-radius: 10rpx;
 		margin: 20rpx auto 39rpx;
 		padding-bottom: 20rpx;
+		.curd-btn{
+			image{
+				width: 26rpx;
+				height: 26rpx;
+				margin-right: 6rpx;
+			}
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #A18353;
+		}
 	}
-	.linp{
+
+	.linp {
 		height: 104rpx;
 		padding: 0 35rpx;
-		.field{
+
+		.field {
 			width: 120rpx;
 			font-size: 28rpx;
 			font-weight: 500;
 			color: #222222;
 			margin-right: 30rpx;
 		}
-		.val{
-			
-		}
+
+		.val {}
 	}
-	.border_bottom{
-		
-border-bottom: 1px solid #EAEAEA;
+
+	.border_bottom {
+
+		border-bottom: 1px solid #EAEAEA;
 	}
-	.tbg{
+
+	.tbg {
 		width: 100%;
 		height: 660rpx;
 		position: relative;
 		padding-top: 176rpx;
-		.ti{
+
+		.ti {
 			font-size: 36rpx;
 			font-weight: bold;
 			color: #FFFFFF;
@@ -170,7 +194,8 @@ border-bottom: 1px solid #EAEAEA;
 			top: 75rpx;
 			left: 36rpx;
 		}
-		.bg{
+
+		.bg {
 			width: 100%;
 			height: 400rpx;
 			position: absolute;
@@ -178,14 +203,16 @@ border-bottom: 1px solid #EAEAEA;
 			left: 0;
 			z-index: -1;
 		}
-		.customerInfo{
+
+		.customerInfo {
 			width: 678rpx;
 			height: auto;
 			background: #fff;
 			border-radius: 10rpx;
 			overflow: hidden;
 			margin: 0 auto 20rpx;
-			.top{
+
+			.top {
 				height: 98rpx;
 				background: #FCF7EA;
 				font-size: 28rpx;
@@ -193,19 +220,22 @@ border-bottom: 1px solid #EAEAEA;
 				color: #D0C9C1;
 				padding: 36rpx 30rpx;
 			}
-			.head{
+
+			.head {
 				width: 127rpx;
 				height: 127rpx;
 				position: relative;
 				margin: 32rpx auto;
 				background-color: #fefefe;
 				z-index: 2;
-				.bg{
+
+				.bg {
 					width: 127rpx;
 					height: 127rpx;
 					border-radius: 50%;
 				}
-				.camera{
+
+				.camera {
 					width: 41rpx;
 					height: 32rpx;
 					position: absolute;

+ 29 - 21
src/pages/sale/properties/addProperties.vue

xqd xqd xqd
@@ -6,7 +6,7 @@
 				placeholder-style="font-size:28rpx;color:#999;" @input="search" />
 		</view>
 		<view class="properties_list">
-			<view class="item main-left" v-for="(item,index) in dataList" :key="index" @click="selectEstate(index,item.name,item.id)">
+			<view class="item main-left" v-for="(item,index) in dataList" :key="index" @click="selectEstate(index,item.name,item.id,item)">
 				<view class="left">
 					<image :src="item.cover_img" mode=""></image>
 				</view>
@@ -63,17 +63,18 @@
 			};
 		},
 		onLoad(option) {
-			this.regionId=JSON.parse(option.regionId)
-			this.type=option.type
+			'regionId' in option?this.regionId=JSON.parse(option.regionId):''
+			'type' in option?this.type=option.type:''
 			this.getDate(1)
 		},
 		methods:{
-			selectEstate(index,name,id){
+			selectEstate(index,name,id,item){
 				// if(this.type==='addCustomer'){
-					var pages = getCurrentPages();
-					var currPage = pages[pages.length - 1]; //当前页面
-					var prevPage = pages[pages.length - 2]; //上一个页面
-					prevPage.$vm.estateInfo={id:id,name:name}
+					let pages = getCurrentPages();
+					let currPage = pages[pages.length - 1]; //当前页面
+					let prevPage = pages[pages.length - 2]; //上一个页面
+					let multiIndex=[item.province_id,item.city_id,item.area_id]
+					prevPage.$vm.estateInfo={id:id,name:name,multiIndex:multiIndex}
 					// uni.navigateBack()
 					// return
 				// }
@@ -81,19 +82,26 @@
 				this.show=true
 			},
 			bindingEstate(){
-				uni.navigateBack()
-				// this.$request({
-				// 	url: this.$api.sale.binding_estate,
-				// 	data: {
-				// 		estate_id:this.dataList[this.selectIndex].id
-				// 	},
-				// 	method: 'post'
-				// }).then(res=>{
-				// 	uni.showToast({
-				// 		icon:'none',
-				// 		title:res.msg
-				// 	})
-				// })
+				let pages = getCurrentPages();
+				let prevPage = pages[pages.length - 2]; //上一个页面
+				if(prevPage.route==='pages/sale/properties/properties'){
+					this.$request({
+						url: this.$api.sale.binding_estate,
+						data: {
+							estate_id:this.dataList[this.selectIndex].id
+						},
+						method: 'post'
+					}).then(res=>{
+						uni.showToast({
+							icon:res.code===0?'success':'none',
+							title:res.msg
+						})
+						this.show=false
+					})
+				}else{
+					uni.navigateBack()
+				}
+				
 			},
 			search(e){
 				this.$utils.debounce(()=>{

+ 43 - 2
src/pages/sale/properties/properties.vue

xqd xqd xqd xqd xqd
@@ -1,5 +1,9 @@
 <template>
 	<view class="properties_list">
+		<view class="main-around tabs">
+			<view class="tab" :class="{'select':audit_state===2}" @click="audit_state=2">已通过<view class="under_line"></view></view>
+			<view class="tab" :class="{'select':audit_state===1}" @click="audit_state=1">待通过<view class="under_line"></view></view>
+		</view>
 		<view class="item main-left" v-for="(item,index) in dataList">
 			<view class="left">
 				<image :src="item.cover_img" mode=""></image>
@@ -22,11 +26,20 @@
 	export default {
 		data() {
 			return {
+				audit_state:2,
 				dataList:[]
 			};
 		},
-		onLoad() {
+		watch:{
+			audit_state(val){
+				this.getDate(1,'')
+			},
+		},
+		onShow() {
 			this.getDate(1,'')
+		},
+		onLoad() {
+			
 		},
 		methods:{
 			getDate(page,name){
@@ -34,8 +47,9 @@
 					url: this.$api.sale.estate_list,
 					data: {
 						page: page,
-						is_myself: 1,
+						is_sale_myself: 1,
 						name: name,
+						audit_state:this.audit_state
 					},
 					method: 'post'
 				}).then(res=>{
@@ -51,6 +65,32 @@
 <style lang="scss" scoped>
 	.properties_list {
 		background-color: #F8F8F8;
+		
+		.tabs{
+			height: 90rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #838584;
+			.tab{
+				width: 50%;
+				line-height: 90rpx;
+				text-align: center;
+			}
+			.select{
+				color: #A18353;
+				position: relative;
+				.under_line{
+					position: absolute;
+					left: 50%;
+					bottom: 10rpx;
+					transform: translateX(-50%);
+					width: 44rpx;
+					height: 3rpx;
+					background: #A18353;
+					border-radius: 2rpx;
+				}
+			}
+		}
 
 		.item {
 			font-family: PingFang SC;
@@ -118,4 +158,5 @@
 			color: #FFFFFF;
 		}
 	}
+
 </style>

+ 4 - 4
src/plugins/composition/components/app-list/app-list.vue

xqd xqd
@@ -33,8 +33,8 @@
 						        </view>
 						        <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
 						    </view>
-						    <view v-if="item.type == 2 && goods.choose_attr" :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view>
-							<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>3000</text>.00</text></view>
+						    <!-- <view v-if="item.type == 2 && goods.choose_attr" :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view> -->
+							<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>{{goods.total_price}}</text></text></view>
 						</view>
 					</view>
 					<app-add-subtract :xStyle="2" :stock="100"></app-add-subtract>
@@ -65,8 +65,8 @@
                             </view>
                             <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
                         </view>
-                        <view v-if="item.type == 2 && goods.choose_attr"  :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view>
-						<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>3000</text>.00</text></view>
+                        <!-- <view v-if="item.type == 2 && goods.choose_attr"  :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view> -->
+						<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>{{goods.total_price}}</text></text></view>
                     </view>
 					</view>
 					<app-add-subtract :xStyle="2" :stock="100"></app-add-subtract>

BIN
src/static/image/sale/shanchu.png


BIN
src/static/image/sale/tianjia.png


+ 6 - 0
src/store/modules/user.js

xqd xqd
@@ -15,6 +15,9 @@ const state = {
     },
     isSign: false,
 	
+	selectedProperties:{
+		name:'绑定楼盘'
+	},
 	
 	isEnterSales:false,//是否进入销售端
 };
@@ -84,6 +87,9 @@ const mutations = {
 			console.log('退出销售端',data)
 		}
 	    state.isEnterSales = data;
+	},
+	selectedProperties(state,data){
+		state.selectedProperties=data
 	}
 };