Files
pgserver3.0/pgapp/pages/survey/shopDetail.vue
annnj-company 130c1026c4 first commit
2026-04-17 18:29:53 +08:00

1543 lines
51 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="survey-detail-container">
<uni-popup ref="popup" type="top" v-show="showPopMenu"><button
@click="submitSurvey">提交</button><button>退回</button></uni-popup>
<view class="uni-padding-wrap uni-common-mt">
<uni-segmented-control :current="current" :values="items" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickItem" />
</view>
<view class="content" style="height: 80vh; overflow: auto;">
<uni-card>
<view v-show="current === 2">
<uni-section title="业务信息" type="line">
<uni-list>
<uni-list-item title="物业名称" :rightText="basicInfo.property_full_name" />
<uni-list-item title="所在城市" :rightText="basicInfo.city" />
<uni-list-item title="业务员" :rightText="basicInfo.user_name" />
<uni-list-item title="业主" :rightText="basicInfo.survey_contacts" />
<uni-list-item title="备注">
<template v-slot:footer>
<view class="desc"><text>{{basicInfo.remark}}</text></view>
</template>
</uni-list-item>
</uni-list>
</uni-section>
</view>
<view v-show="current === 0">
<uni-section title="楼栋物业" type="line">
<uni-list>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>物业地址</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input class="uni-input" v-model="formItem.address" maxlength="50"
placeholder="请输入最多50字" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>建筑面积</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input class="uni-input" v-model="formItem.size" maxlength="50"
placeholder="0" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>竣工时间<br>(:2001-3-4)</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input class="uni-input" v-model="formItem.building_completion_time" maxlength="50"
placeholder="输入日期" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>
<text class="require">*</text>总楼层()
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input type="digit" class="uni-input" v-model="formItem.floor_total" maxlength="50"
placeholder="请输入总楼层" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>裙楼总楼层()</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input type="digit" class="uni-input" v-model="formItem.podium_floor" maxlength="50"
placeholder="请输入裙楼总楼层" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>评估楼层()</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input type="digit" class="uni-input" v-model="formItem.floor_no" maxlength="50"
placeholder="请输入评估楼层" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>层高</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input type="digit" class="uni-input" v-model="formItem.floor_height" maxlength="50"
placeholder="请输入层高(米)" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>小片区</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.area_id" :localdata="areaArray">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>朝向</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.towards" :localdata="residence_towards">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>成新率</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.newness_rate" :localdata="residence_new_rate">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>建筑结构</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input class="uni-input" v-model="formItem.structure" maxlength="50"
placeholder="请输入最多50字" />
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>物业形态</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.property_form" :localdata="shop_property_form">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>经营内容</view>
</template>
<template v-slot:body>
<view class="slot-box">
<textarea v-model="formItem.business_content" maxlength="200"
placeholder="请输入经营内容最多200字" />
</view>
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="商铺状况" type="line">
<uni-list>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>临街情况:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<input class="uni-input" v-model="formItem.shop_condition.shop_beside_street.street" maxlength="50"
placeholder="街名" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>临街情况:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.shop_condition.shop_beside_street.shop_beside_street_situation" :localdata="shop_beside_street_situation">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>夹层:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.shop_condition.shop_beside_street.shop_mezzanine" :localdata="shop_mezzanine">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>商铺形状:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.shop_condition.shop_beside_street.shop_situation_ss" :localdata="shop_situation_ss">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='slot-box' style="align-items: center;">
开间 <input type="digit" size=1 style="text-align: center;" class="uni-input" v-model="formItem.shop_condition.shop_beside_street.bay"
placeholder="0" />
</view>
</template>
<template v-slot:body>
<view class="slot-box" style="align-items: center;">
进深 <input type="digit" class="uni-input" style="text-align: center;" v-model="formItem.shop_condition.shop_beside_street.depth"
placeholder="0" />
</view>
</template>
<template v-slot:footer>
<view class="slot-box" style="align-items: center;">
层高 <input type="digit" class="uni-input" v-model="formItem.shop_condition.shop_beside_street.height"
placeholder="0" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>内铺情况:</view>
</template>
<template v-slot:body>
<view class="slot-box">
距离主要入口 <input type="digit" class="uni-input" v-model="formItem.shop_condition.shop_inner_shop.distance_entrance"
placeholder="0" />
</view>
</template>
</uni-list-item>
<uni-list-item>
<template v-slot:header>
<view class='eva-label'>内铺情况:</view>
</template>
<template v-slot:body>
<view class="slot-box">
距离主手扶梯 <input type="digit" class="uni-input" v-model="formItem.shop_condition.shop_inner_shop.distance_escalator"
placeholder="0" />
</view>
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="使用状况" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>使用现状:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.usage_condition.shop_usage_status" :localdata="shop_usage_status">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='slot-box'>
<text class="require">*</text>租金 <input type="digit" size=1 class="uni-input" style="width: 220rpx;" v-model="formItem.usage_condition.rent_money"
placeholder="0" />/
</view>
<view class="slot-box">
<text class="require">*</text>租期 <input type="digit" class="uni-input" style="width: 220rpx;" v-model="formItem.usage_condition.rent_term"
placeholder="0" />
</view>
<view class="slot-box">
<text class="require">*</text>年递增(%) <input type="digit" class="uni-input" style="width: 220rpx;" v-model="formItem.usage_condition.annual_increment"
placeholder="0" />
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view class='eva-label'><text class="require">*</text>与邻铺打通情况:</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" v-model="formItem.usage_condition.shop_is_through_next" :localdata="shop_is_through_next">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-section title="备注" type="line">
<uni-list>
<uni-list-item>
<template v-slot:footer>
<view class="uni-textarea">
<textarea v-model="formItem.remarks" maxlength="200"
placeholder="请输入最多200字" />
</view>
</template>
</uni-list-item>
</uni-list>
</uni-section>
</uni-list>
</uni-section>
</view>
<view v-show="current === 1">
<uni-section title="装修标准" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view class="slot-box">
<view>街景</view>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.streetscape_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'street_view_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="主体" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view>外墙</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.exterior_wall"
:localdata="shop_outdoor_scene">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.outside_wall_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'exterior_wall_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>门窗</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.door_window"
:localdata="shop_door_window">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.door_window_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'door_window_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>内景</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.interior_wall"
:localdata="shop_parlour">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.inside_wall_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'interior_wall_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>天花板</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.ceiling"
:localdata="shop_balcony">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.ceiling_img_ids"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'ceiling_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>地面</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.ground"
:localdata="shop_kitchen">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.ground_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'ground_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="厨房" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view>天花
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.kitchen.shop_kitchen_ceiling"
:localdata="shop_kitchen2_ceiling">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>墙面
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.kitchen.shop_kitchen_wall"
:localdata="shop_kitchen2_wall">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>地面
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.kitchen.shop_kitchen_ground"
:localdata="shop_kitchen2_ground">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>设备
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.kitchen.shop_kitchen_equipment"
:localdata="shop_kitchen2_equipment">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.kitchen_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'kitchen_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="卫生间" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view>天花
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.bathroom.shop_toilet_ceiling"
:localdata="shop_toilet_ceiling">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>墙面</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.bathroom.shop_toilet_wall"
:localdata="shop_toilet_wall">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>地面</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.bathroom.shop_toilet_ground"
:localdata="shop_toilet_ground">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>洁具</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.bathroom.shop_toilet_sanitary"
:localdata="shop_toilet_sanitary">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.bathroom_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'bathroom_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
<uni-section title="设施" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view>水电
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.facility.shop_facilities_hydropower"
:localdata="shop_facilities_hydropower">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>通信
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.facility.shop_facilities_communication"
:localdata="shop_facilities_communication">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>空调
</view>
</template>
<template v-slot:body>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple
v-model="formItem.facility.shop_facilities_ac"
:localdata="shop_facilities_ac">
</uni-data-checkbox>
</view>
</template>
<template v-slot:footer>
<view><text class="require">*</text>上传图片</view>
<uni-file-picker :auto-upload="false" v-model="formItem.facility_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'facility_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
<!-- <uni-section title="空调" type="line">
<uni-list>
<uni-list-item>
<template v-slot:footer>
<view class="slot-box">
<uni-data-checkbox mode="tag" multiple v-model="formItem.other.residence_other"
:localdata="residence_other">
</uni-data-checkbox>
</view>
</template>
</uni-list-item>
</uni-list>
</uni-section> -->
<uni-section title="图片" type="line">
<uni-list>
<uni-list-item direction="column">
<template v-slot:header>
<view><text class="require">*</text>入户花园</view>
</template>
<template v-slot:body>
<uni-file-picker :auto-upload="false" v-model="formItem.apartment_layout_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'house_type_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>*景观(楼梯)</view>
</template>
<template v-slot:body>
<uni-file-picker :auto-upload="false" v-model="formItem.oriented_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'orientation_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>*物业位置图</view>
</template>
<template v-slot:body>
<uni-file-picker :auto-upload="false" v-model="formItem.location_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'supplement_img_ids')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>*补充图片</view>
</template>
<template v-slot:body>
<uni-file-picker :auto-upload="false" v-model="formItem.supplement_imgs_arr"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg"
@progress="progress($event)" @success="success" @fail="fail"
@select="selectImg($event,'supplement_imgs')" @delete="handleDelete" />
</template>
</uni-list-item>
<uni-list-item direction="column">
<template v-slot:header>
<view>查勘图库</view>
</template>
<template v-slot:body>
<uni-file-picker :auto-upload="false" v-model="img_details.survey_gallery_imgs_details"
file-mediatype="image" mode="grid" file-extname="png,jpg,jpeg" :readonly="true" />
</template>
</uni-list-item>
</uni-list>
</uni-section>
</view>
</uni-card>
</view>
</view>
</template>
<script>
import config from '@/config'
import { toast } from '@/utils/common'
import {
uploadImg
} from "@/api/common"
import {
surveyDetail,
surveyOptions,
surveySubmit
} from '../../api/survey/survey'
export default {
components: {},
data() {
return {
uploadImgTotal:0, // 共要上传图片数量
uploadImgOKQueue:[], // 上传队列
showPopMenu: false,
items: ['楼栋物业', '装修标准','周边设施'],
styles: [{
value: 'button',
text: '按钮',
checked: true
},
{
value: 'text',
text: '文字'
}
],
colors: ['#007aff', '#4cd964', '#dd524d'],
current: 0,
colorIndex: 0,
activeColor: '#007aff',
styleType: 'button',
imagevalues: [],
filePathsList: [],
typeObj: {
house: 1,
hall: 1,
toilet: 1,
balcony: 1
},
typeList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
house_type_range: [{
"value": 0,
"text": "0"
}, {
"value": 1,
"text": "1"
}, {
"value": 2,
"text": "2"
}, {
"value": 3,
"text": "3"
},
{
"value": 4,
"text": "4"
}, {
"value": 5,
"text": "5"
}, {
"value": 6,
"text": "6"
}, {
"value": 7,
"text": "7"
}
],
list: [1, 2, 3, 4],
codeList: [],
basicInfo: {},
areaArray: [],
gapGround: '', // 距离地面
shop_prosperity_vf: [], // 人流量
shop_prosperity_cg: [], // 消费档次
shop_prosperity_mn: [], // 昭示性
shop_business_level: [], // 商圈等级
shop_traffic_condition: [], // 交通条件
shop_property_form: [], // 物业形态
shop_position: [], // 商场定位
shop_above_parking: [], // 地上停车场
shop_under_parking: [], // 地下停车场
shop_parking: [], // 停车场情况
shop_parking_convenient: [], // 是否方便停车
shop_parking_cost_free: [], // 是否免费停车
shop_shopping_cart_pick: [], // 是否购物车接送
shop_usage_status: [], // 使用状况
shop_is_through_next: [], // 是否与邻铺打通
shop_vacant: [], // 空置与装修中
shop_outdoor_scene: [], // 外墙
shop_door_window: [], // 门窗
shop_parlour: [], // 内景
shop_balcony: [], // 天花板
shop_kitchen: [], // 地面
shop_toilet_type: [], // 卫生间-独立
shop_toilet_ceiling: [], // 卫生间-天花
shop_toilet_ground: [], // 卫生间-地面
shop_toilet_sanitary: [], // 卫生间-洁具
shop_toilet_wall: [], // 卫生间-墙面
shop_facilities_ac: [], // 设施-空调
shop_facilities_communication: [], // 设施-通讯
shop_facilities_elevator: [], // 设施-电梯
shop_facilities_hydropower: [], // 设施-水电
shop_situation_ss: [], // 临街-商铺形状
shop_ground_meter: [], // 临街-距离地面
shop_distance_road: [], // 临街-距离道路
shop_green_belt: [], // 临街-有无绿化
shop_pillar_shelter1: [], // 临街-是否柱子遮挡
shop_beside_street_situation: [], // 临街-临街情况
shop_mezzanine: [], // 临街-夹层
shop_basement: [], // 临街-地下室
shop_pillar_shelter: [], // 内铺-是否柱子遮挡
shop_situation_wss: [], // 内铺-商铺形状
shop_kitchen2_ceiling: [], // 厨房-天花
shop_kitchen2_wall: [], // 厨房-墙面
shop_kitchen2_ground: [], // 厨房-地面
shop_kitchen2_equipment: [], // 厨房-设备
residence_towards: [], // 朝向
residence_new_rate: [], // 成新率
formItem: {
towards: '', // 朝向
newness_rate: '', // 成新率
structure: '', // 建筑结构
survey_type: this.$route.query.survey_type, // 1.住宅 2.商业,
survey_id: this.$route.query.survey_id,
prosperity_lv: {
shop_prosperity_vf: '', // 商业繁华程度-人流量
shop_prosperity_cg: '', // 商业繁华程度-消费档次
shop_prosperity_mn: '' // 商业繁华程度-昭示性
},
business_district_lv: {
shop_business_level: '', // 商圈等级
remark: '' // 商圈等级-备注
},
pub_fac: '', // 公共配套设施
traffic: {
shop_traffic_condition: '', // 交通条件
bus_lines: '', // 交通条件-公交路线
subway: '' // 交通条件-地铁
},
address: '', // 物业地址
size: '', // 面积
floor_total: '', // 总楼层
building_completion_time: '', // 竣工时间
podium_floor: '', // 裙楼层数
floor_no: '', // 评估楼层
floor_height: '', // 层高
area_id: '', // 小片区
area: '', // 小片区
property_form: '', // 物业形态
business_content: '', // 经营内容
commercial_positioning: '', // 商业定位
shop_condition: {
// shop_situation: '', // 商铺状况-是否临街
shop_beside_street: { // 商铺状况-临街
street: '', // 临街
bay: '', // 开间
depth: '', // 进深
shop_ground_meter: '', // 距离地面
shop_distance_road: '', // 距离道路
shop_green_belt: '', // 有无绿化
shop_pillar_shelter1: '', // 是否柱子遮挡
shop_beside_street_situation: '', // 临街情况
shop_mezzanine: '', // 夹层
shop_basement: '', // 地下室
shop_situation_ss: '' // 商铺形状
},
shop_inner_shop: { // 商铺状况-内铺
distance_entrance: '', // 距离主要入口
distance_escalator: '', // 距离主手扶梯
shop_pillar_shelter2: '', // 是有柱子遮挡2
shop_situation_wss: '', // 商铺形状
length: '', // 长
width: '' // 宽
}
},
parking_condition: { // 停车状况
// shop_parking: '', // 停车场
shop_above_parking: '', // 地上停车场
shop_under_parking: '', // 地下停车场
shop_parking_convenient: '', // 是否方便停车
shop_parking_cost_free: '', // 是否免费停车
shop_shopping_cart_pick: '' // 是否购物车接送
},
usage_condition: { // 使用状况
shop_usage_status: '',
rent_money: '', // 租金
rent_term: '', // 租期
annual_increment: '', // 年递增
shop_is_through_next: '', // 是否与邻铺打通
shop_vacant: '' // 空置与装修中
},
exterior_wall: [], // 外墙
door_window: [], // 门窗
interior_wall: [], // 内景
ceiling: [], // 天花板
ground: [], // 地面
bathroom: {
shop_toilet_type: [], // 卫生间-独立
shop_toilet_ceiling: [], // 卫生间-天花
shop_toilet_wall: [], // 卫生间-墙面
shop_toilet_ground: [], // 卫生间-地面
shop_toilet_sanitary: [] // 卫生间-洁具
},
facility: {
shop_facilities_hydropower: [], // 水电
shop_facilities_communication: [], // 通讯
shop_facilities_ac: [], // 空调
shop_facilities_elevator_option: [], // 电梯
shop_facilities_elevator: {} // 电梯数量
},
kitchen: {
shop_kitchen_ceiling: [], // 天花
shop_kitchen_wall: [], // 墙面
shop_kitchen_ground: [], // 地面
shop_kitchen_equipment: [] // 设备
},
kitchen_img_ids: [], // 厨房图片
street_view_img_ids: [], // 街景图片
exterior_wall_img_ids: [], // 外墙图片
door_window_img_ids: [], // 门窗图片
interior_wall_img_ids: [], // 内景图片
ceiling_img_ids: [], // 天花板图片
ground_img_ids: [], // 地面图片
bathroom_img_ids: [], // 卫生间图片
facility_img_ids: [], // 设施图片
others_img_ids: [], // 其他图片
supplement_img_ids: [], // 物业位置图
supplement_imgs: [], // 补充图片
survey_loc_img_ids: [], // 定位图
house_type_img_ids: [], // 入户花园
orientation_img_ids: [], // 景观(楼梯)
appraisal_img_ids: [] // 查勘图库
},
img_details: {
survey_gallery_imgs_details: [] // 查勘图库
}
}
},
created() {
this.route = this.$route.query
this.surveyDetail()
this.surveyOptions()
this.initial_uploadMgr()
},
methods: {
initial_uploadMgr()
{
this.uploadImgDelQueue = [];
this.uploadImgDelQueue = [];
this.uploadImgTotal = 0;
},
checkRule () {
// 临时隐藏
// if (this.formItem.prosperity_lv.shop_prosperity_vf === '') {
// toast('商业繁华程度未填写,无法提交')
// return false
// }
// if (this.formItem.prosperity_lv.shop_prosperity_cg === '') {
// toast('商业繁华程度未填写,无法提交')
// return false
// }
// if (this.formItem.prosperity_lv.shop_prosperity_mn === '') {
// toast('商业繁华程度未填写,无法提交')
// return false
// }
// if (this.formItem.business_district_lv.shop_business_level === '') {
// toast('商圈等级未填写,无法提交')
// return false
// }
// if (this.formItem.traffic.shop_traffic_condition === '') {
// toast('交通条件未填写,无法提交')
// return false
// } 临时隐藏
if (this.formItem.floor_total === '') {
toast('总楼层未填写,无法提交')
return false
}
if (this.formItem.podium_floor === '') {
toast('裙楼总楼层未填写,无法提交')
return false
}
if (this.formItem.floor_no === '') {
toast('评估楼层未填写,无法提交')
return false
}
if (this.formItem.floor_height === '') {
toast('层高未填写,无法提交')
return false
}
if (this.formItem.area_id === '') {
toast('小片区未填写,无法提交')
return false
}
if (this.formItem.towards === '') {
toast('朝向未填写,无法提交')
return false
}
if (this.formItem.property_form === '') {
toast('物业形态未填写,无法提交')
return false
}
if (this.formItem.business_content === '') {
toast('经营内容未填写,无法提交')
return false
}
// 临时隐藏
// if (this.formItem.commercial_positioning === '') {
// toast('商业定位未填写,无法提交')
// return false
// }
// if (this.formItem.parking_condition.shop_above_parking === '' ||
// this.formItem.parking_condition.shop_under_parking === '' ||
// this.formItem.parking_condition.shop_parking_convenient === '' ||
// this.formItem.parking_condition.shop_parking_cost_free === '' ||
// this.formItem.parking_condition.shop_shopping_cart_pick === ''
// ) {
// toast('停车状况未填写,无法提交')
// return false
// } 临时隐藏
if (this.formItem.usage_condition.shop_usage_status === ''
) {
toast('使用状况未填写,无法提交')
return false
}
if (this.formItem.usage_condition.shop_is_through_next === '' )
{
toast('与临铺打通情况未填写,无法提交')
return false
}
if (this.formItem.street_view_img_ids.length === 0) {
toast('街景图片未填写,无法提交')
return false
}
if (this.formItem.exterior_wall_img_ids.length === 0) {
toast('外墙图片未填写,无法提交')
return false
}
if (this.formItem.door_window_img_ids.length === 0) {
toast('门窗图片未填写,无法提交')
return false
}
if (this.formItem.interior_wall_img_ids.length === 0) {
toast('内墙图片未填写,无法提交')
return false
}
if (this.formItem.ceiling_img_ids.length === 0) {
toast('天花板图片未填写,无法提交')
return false
}
if (this.formItem.ground_img_ids.length === 0) {
toast('地面图片未填写,无法提交')
return false
}
if (this.formItem.bathroom_img_ids.length === 0) {
toast('卫生间图片未填写,无法提交')
return false
}
if (this.formItem.facility_img_ids.length === 0) {
toast('设施图片未填写,无法提交')
return false
}
// if (this.formItem.house_type_img_ids.length === 0) {
// toast('入户花园未填写,无法提交')
// return false
// }
// if (this.formItem.orientation_img_ids.length === 0) {
// toast('景观(楼梯)未填写,无法提交')
// return false
// }
if (this.formItem.supplement_img_ids.length === 0) {
toast('物业位置图片未填写,无法提交')
return false
}
return true
},
onClickItem(e) {
if (this.current !== e.currentIndex) {
this.current = e.currentIndex
}
},
styleChange(e) {
if (this.styleType !== e.detail.value) {
this.styleType = e.detail.value
}
},
colorChange(e) {
if (this.styleType !== e.detail.value) {
this.activeColor = e.detail.value
}
},
// 选择文件,获取上传状态
selectImg(e, name) {
let tempFilePaths = e.tempFilePaths
if (!tempFilePaths.length)
return
// 加入上传队列
for( let i=0; i<tempFilePaths.length; ++i )
{
const path = tempFilePaths[i]
this.uploadImgOKQueue.push( {path:path, name:name, e:e } );
this.uploadImgTotal++;
this.filePathsList.push({url:path,name:""})
}
// 开始loading界面
uni.showLoading({
title:'正在上传图片 '+ (this.uploadImgTotal-this.uploadImgOKQueue.length)+'/'+this.uploadImgTotal
})
// 开始逐个图上传
let next = this.uploadImgOKQueue.pop();
this.UploadImageNext( next.path , next.name ,this.onUploadOKCallBack, this.onUploadFaildCallback )
},
// 通过path 从Queue里删除一个队列节点
// return Bool
deletUploaFileFromQueue( path )
{
for( let i=0 ; i < this.uploadImgOKQueue; ++i )
{
let node = this.uploadImgOKQueue[i];
if( node.path == path )
{
this.uploadImgOKQueue.splice( i,1 )
this.uploadImgTotal-- ; // 总数减一
return true;
}
}
return false;
},
// 上传图片成功回调
onUploadOKCallBack( response ,name )
{
const data = response.data
const id = data.id
this.formItem[name].push(id)
if (name != 'supplement_imgs' && name != 'supplement_img_ids' && name !='auto_loc_img_ids') {
this.formItem.appraisal_img_ids.push(id)
data['extname'] = data['ext']
data['url'] = data['url'].replaceAll("\\","/")
this.img_details.survey_gallery_imgs_details.push(data)
}
// 每成功加载上传成功加1
title:'正在上传图片 '+ (this.uploadImgTotal-this.uploadImgOKQueue.length)+'/'+this.uploadImgTotal
if( this.uploadImgOKQueue.length <= 0)
{
this.uploadImgTotal = 0;
uni.hideLoading();
}else{
uni.showLoading({
title:'正在上传图片 '+ (this.uploadImgTotal -this.uploadImgOKQueue.length)+'/'+this.uploadImgTotal
})
}
// 进行下一幅图的上传(因为多图上传会产生 timeout )
if( 0 < this.uploadImgOKQueue.length )
{
let next = this.uploadImgOKQueue.pop();
this.UploadImageNext( next.path , next.name ,this.onUploadOKCallBack, this.onUploadFaildCallback )
}
},
// 当上传图片错误的回调
onUploadFaildCallback( err )
{
uni.hideLoading();
uni.showToast({ title: err, icon: 'error' })
window.console.log(err)
},
// 上传图片下一张
UploadImageNext( path , name , callback , faildCallback )
{
uploadImg({filePath: path}).then(response => {
callback( response , name )
}).catch((err) => {
faildCallback(err)
});
},
handleDelete(err) { // 删除图片
const num = this.filePathsList.findIndex(v => v.url === err.tempFilePath);
this.filePathsList.splice(num, 1);
if( this.uploadImgOKQueue.length > 0)
{
uni.showLoading({
title:'正在上传图片 '+ (this.uploadImgTotal-this.uploadImgOKQueue.length)+'/'+this.uploadImgTotal
})
}
else{
uni.hideLoading();
}
},
// 获取上传进度
progress(e) {
console.log('上传进度:', e)
},
// 上传成功
success(e) {
console.log('上传成功')
},
// 上传失败
fail(e) {
console.log('上传失败:', e)
},
onNavigationBarButtonTap(e) {
var index = e.index;
this.showPopMenu = !this.showPopMenu
this.$refs.popup.open('top')
},
submitSurvey() {
console.log(this.formItem)
if (!this.checkRule()) {
return
}
let vm = this;
this.formItem.unit_type =
`${this.typeObj.house}-${this.typeObj.hall}-${this.typeObj.toilet}-${this.typeObj.balcony}`
this.areaArray.forEach((item)=>{
if(item.value == vm.formItem.area_id) {
vm.formItem.area = item.text
}
})
if( this.uploadImgOKQueue.length > 0)
{
toast("已提交,但图片未上传完整!!!")
}
surveySubmit(this.formItem).then(res => {
if (res.code === 1) {
this.$tab.navigateTo('/pages/survey/index')
} else if (res.code === -1) {
this.$modal.msgError(res.msg)
}
})
},
surveyOptions() {
surveyOptions().then(res => {
if (res.code === 1) {
let houseData = res.data.residence
// 商业
let data = res.data.shop
this.residence_towards = this.adapter(houseData.residence_towards._child)
this.residence_new_rate = this.adapter(houseData.residence_new_rate._child)
this.shop_prosperity_vf = this.adapter(data.shop_business_prosperity.shop_prosperity_vf._child)
this.shop_prosperity_cg = this.adapter(data.shop_business_prosperity.shop_prosperity_cg._child)
this.shop_business_level = this.adapter(data.shop_business_level._child)
this.shop_traffic_condition = this.adapter(data.shop_traffic_condition._child)
this.shop_prosperity_mn = this.adapter(data.shop_business_prosperity.shop_prosperity_mn._child)
this.shop_property_form = this.adapter(data.shop_property_form._child)
this.shop_position = this.adapter(data.shop_position._child)
// this.shop_situation=data.shop_situation._child
this.shop_parking_convenient = this.adapter(data.shop_parking_condition.shop_parking_convenient._child)
this.shop_above_parking = this.adapter(data.shop_parking_condition.shop_above_parking._child)
this.shop_under_parking = this.adapter(data.shop_parking_condition.shop_under_parking._child)
this.shop_parking_cost_free = this.adapter(data.shop_parking_condition.shop_parking_cost_free._child)
this.shop_shopping_cart_pick = this.adapter(data.shop_parking_condition.shop_shopping_cart_pick._child)
this.shop_usage_status = this.adapter(data.shop_usage_status._child)
this.shop_is_through_next = this.adapter(data.shop_usage_status.shop_is_through_next._child)
// this.shop_vacant = data.shop_usage_status.shop_vacant._child
this.shop_outdoor_scene = this.adapter(data.shop_outdoor_scene._child)
this.shop_door_window = this.adapter(data.shop_door_window._child)
this.shop_parlour = this.adapter(data.shop_parlour._child)
this.shop_balcony = this.adapter(data.shop_balcony._child)
this.shop_kitchen = this.adapter(data.shop_kitchen._child)
// this.shop_toilet_type = data.shop_toilet.shop_toilet_type._child
this.shop_toilet_ceiling = this.adapter(data.shop_toilet.shop_toilet_ceiling._child)
this.shop_toilet_ground = this.adapter(data.shop_toilet.shop_toilet_ground._child)
this.shop_toilet_sanitary = this.adapter(data.shop_toilet.shop_toilet_sanitary._child)
this.shop_toilet_wall = this.adapter(data.shop_toilet.shop_toilet_wall._child)
this.shop_facilities_ac = this.adapter(data.shop_facilities.shop_facilities_ac._child)
this.shop_facilities_communication = this.adapter(data.shop_facilities.shop_facilities_communication._child)
this.shop_facilities_elevator = this.adapter(data.shop_facilities.shop_facilities_elevator_option._child)
this.shop_facilities_hydropower = this.adapter(data.shop_facilities.shop_facilities_hydropower._child)
this.shop_situation_ss = this.adapter(data.shop_situation.shop_beside_street.shop_situation_ss._child)
this.shop_ground_meter = this.adapter(data.shop_situation.shop_beside_street.shop_ground_meter._child)
this.shop_distance_road = this.adapter(data.shop_situation.shop_beside_street.shop_distance_road._child)
this.shop_green_belt = this.adapter(data.shop_situation.shop_beside_street.shop_green_belt._child)
this.shop_pillar_shelter1 = this.adapter(data.shop_situation.shop_beside_street.shop_pillar_shelter1._child)
this.shop_mezzanine = this.adapter(data.shop_situation.shop_beside_street.shop_mezzanine._child)
this.shop_beside_street_situation = this.adapter(data.shop_situation.shop_beside_street.shop_beside_street_situation._child)
this.shop_basement = this.adapter(data.shop_situation.shop_beside_street.shop_basement._child)
this.shop_pillar_shelter = this.adapter(data.shop_situation.shop_inner_shop.shop_pillar_shelter2._child)
this.shop_situation_wss = this.adapter(data.shop_situation.shop_inner_shop.shop_situation_wss._child)
this.shop_kitchen2_ceiling = this.adapter(data.shop_kitchen2.shop_kitchen2_ceiling._child)
this.shop_kitchen2_equipment = this.adapter(data.shop_kitchen2.shop_kitchen2_equipment._child)
this.shop_kitchen2_ground = this.adapter(data.shop_kitchen2.shop_kitchen2_ground._child)
this.shop_kitchen2_wall = this.adapter(data.shop_kitchen2.shop_kitchen2_wall._child)
// 电梯
const reg = /#/ig
// 临时隐藏
let shop_facilities_elevator = []
this.shop_facilities_elevator.map(item => {
if (item.name === '客梯#部') {
shop_facilities_elevator.push(item)
}
})
// const shop_facilities_elevator = this.shop_facilities_elevator
shop_facilities_elevator.map(item => {
const res = item.name.split('#')
item.data = {
name: res[0],
append: res[1],
checkVal: false,
inputVal: '',
key: item.key2
}
})
this.shop_facilities_elevator = shop_facilities_elevator
// 临街-距离地面
this.shop_ground_meter.map((item, i) => {
const res = item.name.split('#')
item.data = {
name: res[0],
append: res[1],
value: ''
}
})
}
})
},
adapter(data) {
if (Array.isArray(data) && data.length !== 0) {
data.forEach((item) => {
item.value = item.code
item.text = item.name
})
}
return data
},
transArea(areaObj) {
let areaArray = []
for (let key in areaObj) {
areaArray.push({
"value": key,
"text": areaObj[key]
})
}
return areaArray
},
surveyDetail() {
let data = {
order_no: this.route.order_no,
id: this.route.id
}
surveyDetail(data).then(res => {
if (res.code === 1) {
const data = res.data
this.basicInfo = data.inquiry
this.areaArray = this.transArea(data.area)
} else if (res.code == -1) {
this.$modal.msgError(res.msg)
}
})
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
.eva-label {
margin-right: 20px;
width: 200rpx;
}
.uni-common-mt {
margin-top: 30px;
}
.uni-padding-wrap {
// width: 750rpx;
padding: 0px 30px;
}
.survey-detail-container {
margin-bottom: 100rpx;
padding: 20rpx;
}
.btnSurvey {
color: #ff6a00;
}
.line {
width: 100%;
height: 5rpx;
background-color: #E6E6E6;
}
.line2 {
width: 100%;
height: 20rpx;
background-color: #F5F5F5;
}
.desc {
width: 70%;
//background-color: #bb11ff;
}
.slot-box {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
//width: 80%;
}
.slot-box {
}
.tag-view {
margin-right: 10px;
margin-bottom: 10px;
}
.uni-list {
flex: 1;
}
.uni-list-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
background-color: #FFFFFF;
}
.uni-list-item__container {
padding: 12px 15px;
width: 100%;
flex: 1;
position: relative;
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
flex-direction: row;
justify-content: space-between;
align-items: center;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #eee;
}
.uni-list-item__content-title {
font-size: 14px;
}
.uni-input {
height: 28px;
line-height: 28px;
font-size: 15px;
padding: 0px;
flex: 1;
text-align: center;
background-color: #FFFFFF;
}
.require {
color: RED;
}
// .flex-item {
// width: 33.3%;
// height: 30rpx;
// text-align: center;
// line-height: 200rpx;
// }
</style>