first commit
This commit is contained in:
2299
pgapp/pages/inquiry/addInquiry.vue
Normal file
2299
pgapp/pages/inquiry/addInquiry.vue
Normal file
File diff suppressed because it is too large
Load Diff
270
pgapp/pages/inquiry/copyInquiryInfo.vue
Normal file
270
pgapp/pages/inquiry/copyInquiryInfo.vue
Normal file
@@ -0,0 +1,270 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="dialog-mask"
|
||||
@click="$emit('close-dialog')"
|
||||
v-show="dialogVisible"
|
||||
></div>
|
||||
<div class="dialog" v-show="dialogVisible">
|
||||
<div class="dialog-content">
|
||||
<div class="dialog-title">询价条</div>
|
||||
<div class="dialog-body">
|
||||
|
||||
|
||||
<div id='copy-container' ref='copyContainerRef' class='mb-10'>
|
||||
<div class='mb-10' v-for='(item, index) in this.list' :key='index'>
|
||||
<div>【国中评估】</div>
|
||||
<div>物业名称:{{ item.property_full_name }}</div>
|
||||
<div>面积:{{ item.size }}m²</div>
|
||||
<div>证载用途:{{ item.cert_usage }}</div>
|
||||
<div>权利人:{{ item.ownership_type==1?"个人":"企业" }}</div>
|
||||
<div v-if="number_format(item.eva_unit_price) <= 1">
|
||||
<div>您录入的评估单价过小,请检查填写是否有误!</div>
|
||||
<div>备注原因:{{ item.external_remarks }}</div>
|
||||
</div>
|
||||
|
||||
<div class='mb-10' v-if="item.eva_unit_price > 1">
|
||||
<div>评估单价:{{ number_format(item.eva_unit_price) }} 元/m²</div>
|
||||
<div>评估总值:{{ number_format(item.eva_total_value) }} 元</div>
|
||||
<div v-if="item.total_taxes1 > 1">税费合计:{{ number_format(item.total_taxes1) }} 元</div>
|
||||
|
||||
<!-- 净值1、净值2 -->
|
||||
<div v-if='inquiry.bank_name === "中国建设银行"'>
|
||||
<div
|
||||
v-if='item.eva_net_value !== 0 && item.eva_net_value !== "0.00" && inquiry.eva_purpose !== "了解市场价值"'>
|
||||
评估净值1{{ (inquiry.bank_name === "珠海华润银行") ? "(扣全税)" : "" }}:{{ number_format(item.eva_net_value)
|
||||
}} 元
|
||||
</div>
|
||||
<div
|
||||
v-if='item.eva_net_value2 !== 0 && item.eva_net_value2 !== "0.00" && inquiry.eva_purpose !== "了解市场价值"'
|
||||
class='mb-10'>评估净值2{{ (inquiry.bank_name ===
|
||||
"珠海华润银行") ? "(仅扣个税)" : "" }}:{{ number_format(item.eva_net_value2) }} 元</div>
|
||||
</div>
|
||||
|
||||
<div v-if='inquiry.bank_name === "珠海华润银行"'>
|
||||
<div>主动交易净值:{{ number_format(item.eva_total_value) }} 元</div>
|
||||
<div
|
||||
v-if='item.eva_net_value !== 0 && item.eva_net_value !== "0.00" && data.eva_purpose !== "了解市场价值"'>
|
||||
主动评估净值{{ (inquiry.eva_purpose === "抵押贷款(普惠)") ? "(扣全税)" : "" }}
|
||||
:{{ number_format(item.eva_net_value) }} 元</div>
|
||||
<div
|
||||
v-if='item.eva_net_value2 !== 0 && item.eva_net_value2 !== "0.00" && data.eva_purpose !== "了解市场价值"'
|
||||
class='mb-10'>被动评估净值{{ (inquiry.eva_purpose === "抵押贷款(普惠)") ? "(仅扣个税)" : "" }}
|
||||
:{{ number_format(item.eva_net_value2) }} 元</div>
|
||||
</div>
|
||||
|
||||
<!-- 2025-01-02 新增‘平安银行股份有限公司’询价条内容 -->
|
||||
<div v-if='inquiry.bank_name === "平安银行"'>
|
||||
<div>净值1:{{ item.eva_total_value }} 元</div>
|
||||
<div>净值2:{{ item.eva_net_value }} 元</div>
|
||||
<div>净值3:{{ item.eva_net_value2 }} 元</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if='inquiry.bank_name === "徽商银行股份有限公司"'>
|
||||
<div>评估净值1:{{ number_format(item.eva_net_value) }} 元</div>
|
||||
<div>评估净值2:{{ number_format(item.eva_net_value2) }} 元</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if='inquiry.bank_name !== "中国建设银行" && item.eva_net_value !== 0 && item.eva_net_value !== "0.00" && inquiry.eva_purpose !== "了解市场价值" && inquiry.bank_name !== "徽商银行股份有限公司"'>
|
||||
评估净值:{{ number_format(item.eva_net_value) }} 元
|
||||
</div>
|
||||
|
||||
<!-- 贷款金额 (如果是 建设银行-住宅 ) -->
|
||||
<div v-if='inquiry.eva_purpose === "抵押贷款(云)" && inquiry.type == 1'>
|
||||
净值1八成:{{ number_format(item.eva_net_value * 0.8, 0) }}元</div>
|
||||
<div
|
||||
v-if='(inquiry.eva_purpose !== "了解市场价值") && (inquiry.bank_name === "中国建设银行" && inquiry.type !== 2)'>
|
||||
参考贷款金额:{{ number_format(item.gross_value, 0) }} 元 {{ item.tips !== '' && item.tips !== null &&
|
||||
inquiry.bank_name !== '北京银行' ? `(${item.tips})` : '' }}</div>
|
||||
<!-- <div v-if='inquiry.eva_purpose === "抵押贷款(云)" && inquiry.type == 1'>参考贷款金额:{{number_format(item.eva_net_value*0.8, 0)}} 元 (按八成算)</div> -->
|
||||
<div v-if='inquiry.bank_name === "中信银行" && inquiry.type == 1'>
|
||||
贷款额度:{{ number_format(item.eva_net_value * 0.7, 0) }} 元</div>
|
||||
<!-- if 建行-非住宅(商业):新增3个显示项 -->
|
||||
<div
|
||||
v-if='(inquiry.eva_purpose !== "了解市场价值") && (inquiry.bank_name === "中国建设银行" && inquiry.type === 2)'>
|
||||
净值1-七成:{{ number_format(item.eva_net_value * 0.7, 0) }} 元 </div>
|
||||
<div
|
||||
v-if='(inquiry.eva_purpose !== "了解市场价值") && (inquiry.bank_name === "中国建设银行" && inquiry.type === 2)'>
|
||||
净值1-五成:{{ number_format(item.eva_net_value * 0.5, 0) }} 元 </div>
|
||||
<div
|
||||
v-if='(inquiry.eva_purpose !== "了解市场价值") && (inquiry.bank_name === "中国建设银行" && inquiry.type === 2)'>
|
||||
净值2-八五成:{{ number_format(item.eva_net_value2 * 0.85, 0) }} 元 </div>
|
||||
|
||||
<div>{{ item.external_remarks }}</div>
|
||||
</div>
|
||||
<div>——————————————</div>
|
||||
</div>
|
||||
<div class='mb-1'>{{ inquiry.loan_type }}</div>
|
||||
<div class='mb-1'>({{inquiry.bank_name}})</div>
|
||||
<div class='mb-10'>
|
||||
估价人员:{{ inquiry.appraiser_id }}
|
||||
</div>
|
||||
<div v-if="this.list.length > 1">
|
||||
<div class='mb-1'>合计</div>
|
||||
<div class='mb-1'>评估总值:{{getEvaTotalValue(this.list) }}</div>
|
||||
<div class='mb-10'>评估净值:{{getEvaNetValue(this.list) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<uni-button class="copy-button" @click="copyToClipboard">
|
||||
复制到粘贴板
|
||||
</uni-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
inquiry: {
|
||||
type: Object,
|
||||
default: "",
|
||||
},
|
||||
detailIndex: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: [],
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inquiryDetail: {},
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取指导价净值
|
||||
getGuideNetWorth() {
|
||||
let guideTotal =
|
||||
this.inquiryDetail.returnPrices[0].guide_price *
|
||||
this.inquiryDetail.basic_info.size; //参考净值总值
|
||||
return guideTotal - this.inquiryDetail.returnPrices[0].total_guide_tax; // 指导价净值 = 指导价总值 - 指导价总税
|
||||
},
|
||||
|
||||
// 计算多套物业评估值总值
|
||||
getEvaTotalValue(items) {
|
||||
let total = 0;
|
||||
if (items.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].eva_total_value > 0) {
|
||||
total += parseFloat(items[i].eva_total_value);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
},
|
||||
// 计算多套物业评估净值
|
||||
getEvaNetValue(items) {
|
||||
let total = 0;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].eva_net_value > 0) {
|
||||
total += parseFloat(items[i].eva_net_value);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
},
|
||||
|
||||
number_format(n) {
|
||||
const formatter = new Intl.NumberFormat("zh-CN", {
|
||||
// style: 'currency',
|
||||
// currency: 'CNY',
|
||||
});
|
||||
return formatter.format(n);
|
||||
},
|
||||
|
||||
// 将cpoy-container的纯文本内容复制到手机剪贴板上
|
||||
copyToClipboard() {
|
||||
let txt = document.getElementById("copy-container").innerText;
|
||||
let textContent = txt.trim().replace(/ /g, '\n');
|
||||
console.log(textContent);
|
||||
this.$emit("close-dialog");
|
||||
uni.setClipboardData({
|
||||
data: textContent,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: "已复制到剪贴板",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 80%;
|
||||
height: auto;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.dialog-content {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dialog-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialog-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
width: 180px;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
margin-left: auto;
|
||||
background-color: #409eff;
|
||||
vertical-align: bottom;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
1179
pgapp/pages/inquiry/createReportApply.vue
Normal file
1179
pgapp/pages/inquiry/createReportApply.vue
Normal file
File diff suppressed because it is too large
Load Diff
431
pgapp/pages/inquiry/detail.vue
Normal file
431
pgapp/pages/inquiry/detail.vue
Normal file
@@ -0,0 +1,431 @@
|
||||
<template>
|
||||
<view class="inquiry-container">
|
||||
|
||||
|
||||
<!---->
|
||||
<view >
|
||||
<uni-section title="银行信息" type="line">
|
||||
<uni-card>
|
||||
<view class="uni-flex uni-row" style="-webkit-justify-content: space-between;justify-content: space-between;">
|
||||
<view style="width: 150rpx;">询价状态:</view>
|
||||
<view class="btnInquiry" style="-webkit-flex: 1;flex: 1;" >{{inquiry.status_str}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row" style="-webkit-justify-content: space-between;justify-content: space-between;">
|
||||
<view style="width: 150rpx;">单 号:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.order_no}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">银行名称:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.bank_name}}-{{inquiry.bank_branch_name}}-{{inquiry.bank_sub_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">询价时间:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.create_time}}</view>
|
||||
</view>
|
||||
<view v-if="inquiry!=null&&inquiry.status!=1" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">回价时间:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.response_time}}</view>
|
||||
</view>
|
||||
<view v-if="inquiry!=null&&inquiry.status!=1" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">回价员:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.response_username}}</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">客户经理:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.bank_customer_mgr_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估目的:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.eva_purpose}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">物业数量:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{getEstateCount()}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">回价附件:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">
|
||||
<view v-for="(file, index) in inquiry.return_price_attachments_list" :key="index">
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 250rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{file.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="" v-if="inquiry.return_price_attachments_list.length>0">
|
||||
<uni-button type="primary" plain size="mini" @click="previewFile(inquiry.return_price_attachments_list)">预览</uni-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
|
||||
|
||||
<uni-section title="物业信息" type="line" style="position: relative;">
|
||||
<uni-button type="primary" size="mini" style="position: absolute; right: 20px; top: 10px;" @click='showAllDetailsDialog'>
|
||||
复制
|
||||
</uni-button>
|
||||
<view v-for='(item, index) in inquiry.inquiry_details' :key='index'>
|
||||
<view class="detail">
|
||||
<uni-card>
|
||||
<view class="uni-flex uni-row" style="justify-content: flex-end;">
|
||||
<view style="width: 440rpx;"></view>
|
||||
</view>
|
||||
<view :ref="`copyContainerRef${index}`">
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">物业名称{{index+1}}:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.property_full_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">面积(㎡):</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.size}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">所在地区:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.city}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">房屋用途:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.usage}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">银行:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.bank_name +"-"+ inquiry.bank_branch_name + inquiry.bank_sub_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估目的:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{inquiry.eva_purpose}}</view>
|
||||
</view>
|
||||
<view v-if="item.eva_unit_price!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估单价:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_unit_price}} 元/㎡</view>
|
||||
</view>
|
||||
<view v-if="item.eva_total_value!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估总值:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_total_value}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.eva_net_value!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估净值 1:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_net_value}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.eva_net_value2!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估净值 2:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_net_value2}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.total_taxes1!=0&&item.total_taxes1!=null" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">税费 1:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.total_taxes1}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.total_taxes2!=0&&item.total_taxes2" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">税费 2:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.total_taxes2}} 元</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">产证附件:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">
|
||||
<view v-for="(file, index) in item.attachments_list" :key="index">
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 250rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{file.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="" v-if="item.attachments_list.length>0">
|
||||
<uni-button type="primary" plain size="mini" @click="previewFile(item.attachments_list)">预览</uni-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-if="item.!=0&&item." class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">贷款成数:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.!=0&&item." class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">贷款金额 2:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.!=0&&item." class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">外部备注:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.}} 元</view>
|
||||
</view> -->
|
||||
<!-- <button v-if="inquiry!=null&&inquiry.status!=1" @click="showDialog(item)">复制询价条</button>-->
|
||||
<!-- <quick-inquiry-info v-if="inquiryDetail!=null" :dialog-visible="dialogVisible" :inquiry-detail="inquiryDetail" @close-dialog="dialogVisible = false" @copy-to-clipboard="copyToClipboard" ></quick-inquiry-info> -->
|
||||
<!-- <copy-inquiry-info v-if="inquiryDetail!=null" :dialog-visible="dialogVisible" :inquiry="inquiryDetail" @close-dialog="dialogVisible = false" @copy-to-clipboard="copyToClipboard" :detailIndex="detailIndex"></copy-inquiry-info>-->
|
||||
<copy-inquiry-info v-if="inquiry.inquiry_details.length > 0" :dialog-visible="dialogVisible" :inquiry="inquiry" :list="inquiry.inquiry_details" @close-dialog="dialogVisible = false" @copy-to-clipboard="copyToClipboard"></copy-inquiry-info>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</uni-section>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserID } from '@/utils/auth'
|
||||
import { returnedPriceDetails,inquiryDetail } from '../../api/inquiry/inquiry'
|
||||
// import QuickInquiryInfo from "./quickInquiryInfo.vue";
|
||||
import CopyInquiryInfo from "./copyInquiryInfo.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CopyInquiryInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
currentItem:{},
|
||||
inquiry: [],
|
||||
//inquiry_detail:this.$route.query.inquir_detail_item,
|
||||
total:0,
|
||||
evaluatePurposeList:[],
|
||||
dialogVisible: false,
|
||||
inquiryDetail: null,
|
||||
list:[],
|
||||
detailIndex:0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.dialogVisible// dialogVisible, //是否
|
||||
},
|
||||
|
||||
|
||||
onLoad(options)
|
||||
{
|
||||
// 外部传入
|
||||
let inquir_detail_item = JSON.parse(decodeURIComponent(options.inquir_detail_item));
|
||||
this.inquiry = inquir_detail_item;
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取物业数量
|
||||
getEstateCount()
|
||||
{
|
||||
if( undefined != this.inquiry.inquiry_details)
|
||||
{
|
||||
return this.inquiry.inquiry_details.length
|
||||
}
|
||||
else{
|
||||
return 0
|
||||
}
|
||||
},
|
||||
showAllDetailsDialog(){
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
|
||||
showDialog(index) {
|
||||
// let detail = item;
|
||||
// let params = { inquiry_id: this.inquiry.id, property_cert_info_id: detail.id };
|
||||
// // 打开询价条窗口前向服务器请求数据
|
||||
// inquiryDetail(params).then(response => {
|
||||
// if (response && response.data) {
|
||||
// this.inquiryDetail = response.data;
|
||||
// console.log("showDialog(item) ",this.inquiryDetail)
|
||||
// this.dialogVisible = true;
|
||||
// }
|
||||
// });
|
||||
this.inquiryDetail = this.inquiry;
|
||||
this.detailIndex = index;
|
||||
console.log("showDialog(item) ",this.inquiryDetail)
|
||||
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
|
||||
openQuickInquiryInfo(item) {
|
||||
let detail = item;
|
||||
let params = { inquiry_id: this.inquiry.id, property_cert_info_id: detail.id };
|
||||
|
||||
inquiryDetail(params).then(response => {
|
||||
if (response && response.data) {
|
||||
this.$refs.quickInquiryInfo.open();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
copyToClipboard() {
|
||||
// 将多行输入框的内容复制到手机剪贴板上
|
||||
uni.setClipboardData({
|
||||
data: this.inquiryDetail,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '已复制',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
search() {
|
||||
|
||||
this.getWaitReturnPriceList(this.keyword);
|
||||
},
|
||||
newInquiry() {
|
||||
this.$tab.navigateTo('/pages/inquiry/addInquiry')
|
||||
},
|
||||
|
||||
// 请求详情
|
||||
onRequestInquiryDetal() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/inquiry/detail?inquiry_id=${this.currentItem.order_no}'
|
||||
})
|
||||
},
|
||||
|
||||
//询价待回价
|
||||
getWaitReturnPriceList(keyword) {
|
||||
let params = {
|
||||
"page": 1,
|
||||
"limit": 100,
|
||||
"bank_id": "",
|
||||
// "status": "1",
|
||||
"type": "",
|
||||
// "start_time": "2023-02-10",
|
||||
// "end_time": "2023-05-11",
|
||||
"eva_purpose": "",
|
||||
"search_text": keyword,
|
||||
"user_id": getUserID(),
|
||||
"response_username": "",
|
||||
"start_time_length": "",
|
||||
"end_time_length": ""
|
||||
}
|
||||
waitReturnPrice(params).then(res => {
|
||||
window.console.log(res)
|
||||
this.list = res.data.data
|
||||
this.total = res.data.count
|
||||
}).catch(() => {
|
||||
console.log('waitReturnPrice Error')
|
||||
})
|
||||
},
|
||||
handleClick(item) {
|
||||
this.currentItem = item
|
||||
this.$refs.surveyType.open()
|
||||
//this.$tab.navigateTo(`/pages/survey/detail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=${item.survey_type}`)
|
||||
},
|
||||
navSurvey(surveyType) {
|
||||
let item = this.currentItem
|
||||
if(surveyType == 'house') {
|
||||
this.$tab.navigateTo(`/pages/survey/houseDetail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=1`)
|
||||
}else if (surveyType == 'shop') {
|
||||
this.$tab.navigateTo(`/pages/survey/shopDetail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=2`)
|
||||
}
|
||||
},
|
||||
onCopyPress(index) {
|
||||
const ref = `copyContainerRef${index}`;
|
||||
const element = this.$refs[ref];
|
||||
|
||||
if (!element) {
|
||||
uni.showToast({ title: '复制失败:未找到内容', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const targetElement = Array.isArray(element) ? element[0] : element;
|
||||
let textContent = '';
|
||||
|
||||
// 关键修改:使用 innerText 代替 textContent 保留换行符
|
||||
if (targetElement instanceof HTMLElement) {
|
||||
textContent = targetElement.textContent.trim();
|
||||
} else if (targetElement && targetElement.$el) {
|
||||
// 如果是 Vue 组件实例,获取其根元素的文本
|
||||
textContent = targetElement.$el.textContent.trim();
|
||||
}
|
||||
console.log("textContent",textContent);
|
||||
// 去除首尾空白并确保换行符统一为 \n
|
||||
textContent = textContent.trim().replace(/。/g, '\n');
|
||||
|
||||
if (!textContent) {
|
||||
uni.showToast({ title: '复制失败:无内容可复制', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
uni.setClipboardData({
|
||||
data: textContent,
|
||||
success() {
|
||||
uni.showToast({ title: '复制成功', duration: 2000 });
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({ title: `复制失败:${err.errMsg}`, icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
previewFile(file) {
|
||||
if(file.length == 0) {
|
||||
uni.showToast({ title: '无图片可预览', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const urls = file.filter(item => item.ext === 'jpg' || item.ext === 'png' || item.ext === 'jpeg')
|
||||
.map(item => item.url);
|
||||
|
||||
uni.previewImage({
|
||||
urls: urls,
|
||||
longPressActions: {
|
||||
itemList: ['保存图片'],
|
||||
success: function(data) {
|
||||
console.log('选中了第' + (data.tapIndex + 1) + '个按钮, 下标为:' + data.index)
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err.errMsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.inquiry-container {
|
||||
margin-bottom: 100rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.toolbar {
|
||||
margin-bottom: 50rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.btn {
|
||||
color: #ff6a00;
|
||||
border:1px;
|
||||
border-color: blue;
|
||||
}
|
||||
.btnInquiry {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 5rpx;
|
||||
background-color: #E6E6E6;
|
||||
}
|
||||
.line2 {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.text-title {
|
||||
color: #303133;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.iconfont {
|
||||
font-size: 16px;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-item {
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
.flex-item {
|
||||
width: 33.3%;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
//line-height: 200rpx;
|
||||
}
|
||||
</style>
|
||||
170
pgapp/pages/inquiry/historyList.vue
Normal file
170
pgapp/pages/inquiry/historyList.vue
Normal file
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
@scrolltolower="loadMore"
|
||||
lower-threshold="100"
|
||||
:style="{ height: `calc(100vh - 100rpx)` }"
|
||||
:show-scrollbar="false"
|
||||
class="scroll-view">
|
||||
<view class="scroll-view-item" v-for="(item, index) in list" :key="index">
|
||||
<view class="scroll-list" @click="toDetail(item)">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left" style="font-weight: bold;">
|
||||
{{ item.order_no }}
|
||||
</view>
|
||||
<view class="uni-list-cell-db" style="color:#007aff;font-weight: bold;">
|
||||
{{ item.eva_unit_price }} 元/㎡
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
询价目标
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
{{ item.eva_purpose }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
委托方
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
{{ item.bank_name +item.bank_branch_name+item.bank_sub_name }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
询价时间
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
{{ item.eva_submit_datetime }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
评估总值
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
{{ item.eva_total_value }} 元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getThreeMonthSameEstateInquiryRecord } from '../../api/inquiry/inquiry'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
loading: false,
|
||||
list: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
onLoad(options)
|
||||
{
|
||||
// 外部传入
|
||||
let params = JSON.parse(decodeURIComponent(options.params));
|
||||
this.info = params;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
const params = {
|
||||
building_name: this.info.building_name,
|
||||
building_no: this.info.building_no,
|
||||
unit_no: this.info.unit_no,
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
}
|
||||
getThreeMonthSameEstateInquiryRecord(params)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 1) {
|
||||
const newData = res.data.data || []
|
||||
if (this.page === 1) {
|
||||
this.list = newData
|
||||
} else {
|
||||
this.list = [...this.list, ...newData]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
loadMore() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
this.page++;
|
||||
this.getList();
|
||||
},
|
||||
toDetail(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/inquiry/detail?inquir_detail_item='+ encodeURIComponent(JSON.stringify(item))
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 93vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
/* 将 mask 缩小到一行 */
|
||||
.uni-popup-mask {
|
||||
height: 1px;
|
||||
}
|
||||
/* 将 mask 演示为浅蓝色 */
|
||||
.uni-popup-mask::before {
|
||||
background-color: #e6f1ff;
|
||||
}
|
||||
.uni-list-cell {
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-input {
|
||||
height: 50rpx;
|
||||
padding: 0rpx 25rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.property-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 2000;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.uni-file-picker{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.scroll-list{
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.uni-list-cell-db{
|
||||
text-align: right;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
</style>
|
||||
502
pgapp/pages/inquiry/index.vue
Normal file
502
pgapp/pages/inquiry/index.vue
Normal file
@@ -0,0 +1,502 @@
|
||||
<template>
|
||||
|
||||
<view class="inquiry-container">
|
||||
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="flex-item "><button size="mini" type="primary" @click="newInquiry()">发起询价</button></view>
|
||||
<!-- <view class="flex-item "> <button size="mini" type="primary" @click="openFilter()">展示全部</button> </view> -->
|
||||
<view class="flex-item" style="margin-top: 10rpx; margin-left: 80rpx; text-align: center; color: cornflowerblue; width: 350rpx;height: 50rpx;" > “过滤” 能提升速度 </view>
|
||||
<view class="flex-item "><button style="background-color:blue" size="mini" type="primary" @click="openFilter()">过滤</button></view>
|
||||
</view>
|
||||
<uni-card>
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="uni-list-cell-left" style="margin-top: 20rpx;">
|
||||
<text style="color: blue;" >询价开始日期</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<picker mode="date" :value="inquiryRequest.start_time" :start="startDate" :end="endDate" @change="onChangeSelect($event, 'InquirDate',0,inquiryRequest)">
|
||||
<view class="uni-input" style="color: blue; border-radius: 10rpx; border: 1rpx solid #999999 ;margin-left: 10rpx; margin-top: 0rpx; width: 280rpx;height: 80rpx;text-align: center;" >{{inquiryRequest.start_time}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="uni-list-cell-left" style="margin-top: 20rpx;">
|
||||
<text >询价结束日期</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<picker mode="date" :value="inquiryRequest.end_time" :start="startDate" :end="endDate" @change="onChangeSelect($event, 'InquiryEndDate',0,inquiryRequest)">
|
||||
<view class="uni-input" style=" border-radius: 10rpx; border: 1rpx solid #999999 ;margin-left: 10rpx; margin-top: 0rpx; width: 280rpx;height: 80rpx;text-align: center;" >{{inquiryRequest.end_time}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="flex-item" style="border-radius: 10rpx; margin-left: 23rpx; border: 1rpx solid #dddddd ; text-align: center; width: 480rpx;height: 70rpx;" >
|
||||
<input class="uni-input" style="margin-left: 5rpx;width:460rpx;height: 65rpx" v-model="keyword" placeholder="搜索 物业名 / 银行" /></view>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="flex-item" style="margin-left: 530rpx;margin-top: 0rpx;">
|
||||
<button size="mini" type="primary" @click="search()">搜索</button></view>
|
||||
</view>
|
||||
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view class="flex-item" style=" margin-left: 40rpx; text-align: left;width: 450rpx;height: 30rpx;font-weight: 700;" >询价量:{{ total==0?"加载中...":pageInfo.limit>total?total:pageInfo.limit}} / {{total==0?"":total}} </view>
|
||||
</view>
|
||||
|
||||
<view v-for="(item, findex) in list" :key="findex">
|
||||
<uni-card>
|
||||
<view class="detail" @click="goToDetail(item)">
|
||||
<view class="uni-flex uni-row" style="-webkit-justify-content: space-between;justify-content: space-between;">
|
||||
<view >{{item.order_no}}</view>
|
||||
<view class="btnInquiry" >{{item.status_str}}</view>
|
||||
</view>
|
||||
<view class="line" ></view>
|
||||
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">物业名称:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.property_full_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">询价套数:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.is_multi_str}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">所属银行:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.bank_name +'-'+ item.bank_branch_name + "-"+ item.bank_sub_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">客户经理:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.bank_customer_mgr_name}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估目的:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_purpose}}</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">面积(M):</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.size}}</view>
|
||||
</view>
|
||||
<view v-if="item.eva_unit_price!=0" class="uni-flex uni-row">
|
||||
<view style="min-width: 150rpx;">评估单价:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_unit_price}} 元/㎡</view>
|
||||
</view>
|
||||
<view v-if="item.eva_total_value!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估总值:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_total_value}} 元</view>
|
||||
</view>
|
||||
<!--<view v-if="item.eva_net_value!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估净值 1:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_net_value}} 元</view>
|
||||
</view>
|
||||
<view v-if="item.eva_net_value2!=0" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">评估净值 2:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.eva_net_value2}} 元</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">询价员:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.response_username}}</view>
|
||||
</view>-->
|
||||
<view class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">询价时间:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.create_time}}</view>
|
||||
</view>
|
||||
<view v-if="item.maker!=null" class="uni-flex uni-row">
|
||||
<view style="width: 150rpx;">报告制作人:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.maker}}</view>
|
||||
</view>
|
||||
<view v-if="item.estimate_no!=null" class="uni-flex uni-row">
|
||||
<view style="width: 200rpx;">电子档提取码:</view>
|
||||
<view style="-webkit-flex: 1;flex: 1;">{{item.estimate_no}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-flex uni-row uni-mb-4">
|
||||
<view v-if="item.status == 2" class="flex-item "><button size="mini" style="width: 180rpx;background-color: #CC985E;" type="primary" @click="newSurvey(item)">发起查勘</button></view>
|
||||
|
||||
<!-- <view v-if="item.status == 4 || item.status == 5" class="flex-item "><view class="btn"><text @click="createReport(item)">申请生成报告</text></view></view>-->
|
||||
<!-- <view class="flex-item "><view class="btn"><text @click="cancelInquiry()">撤单</text></view></view>
|
||||
<view class="flex-item "><view class="btn"><text @click="uploadCertificate()">上传产证</text></view></view>
|
||||
<view class="flex-item "><view class="btn"><text @click="adjustInquiry()">调价</text></view></view> -->
|
||||
|
||||
</view>
|
||||
<!-- <view class="line2" v-if="findex !== list.length - 1"></view> -->
|
||||
</uni-card>
|
||||
</view>
|
||||
<uni-popup ref="filterPopup" type="right">
|
||||
<view>
|
||||
|
||||
<uni-card @click="closePopup">
|
||||
<uni-data-checkbox mode="tag" selectedColor="red" @change="filterInquiry"
|
||||
v-model="filterStatus"
|
||||
:localdata="inquiryStatus">
|
||||
</uni-data-checkbox>
|
||||
</uni-card>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserID } from '@/utils/auth'
|
||||
import { waitReturnPrice,getOfficialResultStatus } from '../../api/inquiry/inquiry'
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
filterStatus:'0',
|
||||
pageInfo:null,
|
||||
inquiryRequest:{
|
||||
"page": "1",
|
||||
"limit": "20",
|
||||
"bank_id": "",
|
||||
"status": "0",
|
||||
"type": "",
|
||||
"start_time": this.getPastDate(10),
|
||||
"end_time": this.getPastDate(0),
|
||||
"eva_purpose": "",
|
||||
"search_text": "",
|
||||
"user_id": getUserID(),
|
||||
"response_username": "",
|
||||
"start_time_length": "",
|
||||
"end_time_length": "",
|
||||
},
|
||||
inquiryStatus:[
|
||||
{
|
||||
"value": "0",
|
||||
"text": "所有 "
|
||||
},
|
||||
{
|
||||
"value": "-1",
|
||||
"text": "已撤单(未申请出报告)"
|
||||
},
|
||||
{
|
||||
"value": "-2",
|
||||
"text": "已撤单(已申请出报告)"
|
||||
},
|
||||
{
|
||||
"value": "1",
|
||||
"text": "待回价"
|
||||
},
|
||||
{
|
||||
"value": "2",
|
||||
"text": "待业务确认"
|
||||
},
|
||||
{
|
||||
"value": "3",
|
||||
"text": "查勘待派单"
|
||||
},
|
||||
{
|
||||
"value": "4",
|
||||
"text": "查勘待完成"
|
||||
},
|
||||
{
|
||||
"value": "5",
|
||||
"text": "待生成报告"
|
||||
},
|
||||
{
|
||||
"value": "6",
|
||||
"text": "报告制作中"
|
||||
},
|
||||
{
|
||||
"value": "7",
|
||||
"text": "报告待审核"
|
||||
},
|
||||
{
|
||||
"value": "8",
|
||||
"text": "报告已完成"
|
||||
}
|
||||
],
|
||||
currentItem:{},
|
||||
list: [],
|
||||
total:0,
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWaitReturnPriceList({});
|
||||
},
|
||||
computed: {
|
||||
startDate() {
|
||||
return this.getDate('start');
|
||||
},
|
||||
endDate() {
|
||||
return this.getDate('end');
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
//this.filterStatus ="1"
|
||||
//console.log('created', this.filterStatus )
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
closePopup() {
|
||||
this.$refs.filterPopup.close()
|
||||
} ,
|
||||
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
if (type === 'start') {
|
||||
year = year - 100;
|
||||
} else if (type === 'end') {
|
||||
year = year + 100;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
|
||||
filterInquiry(e) {
|
||||
this.inquiryRequest.status = this.filterStatus
|
||||
this.getWaitReturnPriceList(this.inquiryRequest);
|
||||
/*
|
||||
if(this.filterStatus == "0") {
|
||||
let item = {"status=0": this.filterStatus}
|
||||
this.getWaitReturnPriceList({});
|
||||
}else {
|
||||
let item = {"status": this.filterStatus}
|
||||
this.getWaitReturnPriceList(item);
|
||||
}*/
|
||||
this.$refs.filterPopup.close()
|
||||
},
|
||||
cancelFilter(){
|
||||
this.$refs.filterPopup.close()
|
||||
},
|
||||
|
||||
openFilter(){
|
||||
this.$refs.filterPopup.open()
|
||||
},
|
||||
createReport(item) {
|
||||
this.$tab.navigateTo(`/pages/inquiry/createReportApply?order_no=${item.order_no}&inquiry_id=${item.quot_id}&city_id=${item.city_id}&bank_name=${item.bank_name}&inquiryStatus=${item.status}`)
|
||||
},
|
||||
newSurvey(item) {
|
||||
console.log('newSurvey: item:',item,item.quot_id)
|
||||
this.$tab.navigateTo(`/pages/inquiry/surveyApply?order_no=${item.order_no}&inquiry_id=${item.quot_id}&city_id=${item.city_id}`)
|
||||
},
|
||||
cancelInquiry() {
|
||||
|
||||
},
|
||||
uploadCertificate() {
|
||||
|
||||
},
|
||||
adjustInquiry() {
|
||||
|
||||
},
|
||||
search() {
|
||||
let item = {"search_text": this.keyword}
|
||||
this.inquiryRequest.search_text = this.keyword
|
||||
let start_date = new Date(this.inquiryRequest.start_time)
|
||||
let end_date = new Date(this.inquiryRequest.end_time)
|
||||
let gap = start_date.getTime() - end_date.getTime()
|
||||
if( gap > 0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:"询价开始时间不能大于当前时间!"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.getWaitReturnPriceList(item);
|
||||
|
||||
},
|
||||
newInquiry() {
|
||||
this.$tab.navigateTo('/pages/inquiry/addInquiry')
|
||||
},
|
||||
|
||||
// 跳到详情页
|
||||
goToDetail( item ) {
|
||||
let evaList = this.evaluatePurposeList;
|
||||
this.$tab.navigateTo('/pages/inquiry/detail?inquir_detail_item='+ encodeURIComponent(JSON.stringify(item)) );
|
||||
},
|
||||
|
||||
// 日期计算函数,获取当前时间,往前days天的日期,格式为 2024-1-1
|
||||
getPastDate(days) {
|
||||
const currentDate = new Date();
|
||||
const pastDate = new Date(currentDate.getTime() - days * 24 * 60 * 60 * 1000); // 一天的毫秒数
|
||||
const year = pastDate.getFullYear();
|
||||
const month = ("0" + (pastDate.getMonth() + 1)).slice(-2); // 月份从0开始,所以需要+1,并且前面补0
|
||||
const day = ("0" + pastDate.getDate()).slice(-2); // 日前面补0
|
||||
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
|
||||
//询价待回价
|
||||
getWaitReturnPriceList(item) {
|
||||
let params = Object.assign({}, params, item)
|
||||
params = this.inquiryRequest
|
||||
params.user_id = getUserID()
|
||||
this.pageInfo = this.inquiryRequest//params;
|
||||
//console.log("getWaitReturnPriceList:",params,item)
|
||||
uni.showLoading({})
|
||||
// console.log('getWaitReturnPriceList param',params )
|
||||
waitReturnPrice(params).then(res => {
|
||||
window.console.log('waitReturnPrice:',res)
|
||||
this.initialStatus( res.data.data )
|
||||
this.list = res.data.data
|
||||
this.total = res.data.count
|
||||
|
||||
if(this.total == 0 )
|
||||
{
|
||||
uni.showToast({title:'找不到询价数据!\r\n 您可调整[ 询价开始日期 ],扩大您的搜索范围。', icon:'error',duration:3000})
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch((r) => {
|
||||
console.log('waitReturnPrice Error:',r)
|
||||
})
|
||||
},
|
||||
|
||||
initialStatus( list )
|
||||
{
|
||||
console.log( 'list length:',list.length)
|
||||
for( let i=0; i<list.length; ++i)
|
||||
{
|
||||
let item = list[i];
|
||||
//console.log('for ',item.status_str)
|
||||
if( item.bank_name == "中国银行" && item.status_str == "报告已完成")
|
||||
{
|
||||
setTimeout(() => {
|
||||
// 在这里执行你的函数
|
||||
let params = { pre_estimate_no:item.estimate_no }
|
||||
getOfficialResultStatus(params).then( res =>{
|
||||
list[i].status_str = this.getStatueStr( item.bank_name, item.status_str , res.data ) ;
|
||||
console.log("initialStatus : response getOfficalresut status",item.status_str )
|
||||
this.$forceUpdate() ;
|
||||
})
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 获取处理状态数据
|
||||
getStatueStr( bankNameStr , statusStr,handle_str ) {
|
||||
// 只有中国银行有是否提交报告
|
||||
// if( '中国银行'== bankNameStr)
|
||||
// {
|
||||
// if( '报告已完成' == statusStr )
|
||||
// {
|
||||
// if( 1 == handle_str)
|
||||
// {
|
||||
// return statusStr+'(已传中行)'
|
||||
// }
|
||||
// else{
|
||||
// return statusStr+'(未传中行)'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
return statusStr;
|
||||
// }
|
||||
},
|
||||
|
||||
handleClick(item) {
|
||||
this.currentItem = item
|
||||
this.$refs.surveyType.open()
|
||||
//this.$tab.navigateTo(`/pages/survey/detail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=${item.survey_type}`)
|
||||
},
|
||||
|
||||
|
||||
onChangeSelect(event, name, index, item) {
|
||||
if (!event) {
|
||||
return
|
||||
}
|
||||
switch (name) {
|
||||
case 'InquirDate':
|
||||
this.inquiryRequest.start_time = event.detail.value
|
||||
this.search()
|
||||
break;
|
||||
case 'InquiryEndDate':
|
||||
console.log('end date', event.detail.value)
|
||||
this.inquiryRequest.end_time = event.detail.value
|
||||
this.search()
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
navSurvey(surveyType) {
|
||||
let item = this.currentItem
|
||||
if(surveyType == 'house') {
|
||||
this.$tab.navigateTo(`/pages/survey/houseDetail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=1`)
|
||||
}else if (surveyType == 'shop') {
|
||||
this.$tab.navigateTo(`/pages/survey/shopDetail?order_no==${item.order_no}&id=${item.id}&survey_id=${item.survey_id}&survey_type=2`)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.inquiry-container {
|
||||
margin-bottom: 100rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.toolbar {
|
||||
margin-bottom: 50rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.btn {
|
||||
color: #007aff;
|
||||
|
||||
margin: 10rpx;
|
||||
border-color: blue;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.btnInquiry {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 5rpx;
|
||||
background-color: #E6E6E6;
|
||||
}
|
||||
.line2 {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.text-title {
|
||||
color: #303133;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.iconfont {
|
||||
font-size: 16px;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-item {
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
.flex-item {
|
||||
width: 33.3%;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
//line-height: 200rpx;
|
||||
}
|
||||
.button-sp-area {
|
||||
margin: 0 auto;
|
||||
width: 80%;
|
||||
}
|
||||
.mini-btn {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
</style>
|
||||
168
pgapp/pages/inquiry/quickInquiryInfo.vue
Normal file
168
pgapp/pages/inquiry/quickInquiryInfo.vue
Normal file
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dialog-mask" @click="$emit('close-dialog')" v-show="dialogVisible"></div>
|
||||
<div class="dialog" v-show="dialogVisible">
|
||||
<div class="dialog-content">
|
||||
<div class="dialog-title">询价条</div>
|
||||
<div class="dialog-body">
|
||||
<div id="copy-container" class="textarea">
|
||||
<div>物业名称:{{inquiryDetail.basic_info.building_name+inquiryDetail.basic_info.building_no+inquiryDetail.basic_info.unit_no}}</div>
|
||||
<div>面积:{{inquiryDetail.basic_info.size}}m²</div>
|
||||
<div>房屋用途:{{inquiryDetail.basic_info.usage_str}}</div>
|
||||
<div>①评估价:</div>
|
||||
<div>评估单价:{{number_format(inquiryDetail.basic_info.eva_unit_price)}} 元/m²</div>
|
||||
<div>总值:{{number_format(inquiryDetail.basic_info.eva_total_value)}} 元</div>
|
||||
|
||||
|
||||
<!-- 净值1、净值2 -->
|
||||
<!-- <div v-if='inquiryDetail.bank_name === "中国建设银行" || inquiryDetail.bank_name === "珠海华润银行"'>-->
|
||||
<div v-if='inquiryDetail.bank_name === "中国建设银行"'>
|
||||
<div v-if='inquiryDetail.basic_info.eva_net_value !== 0 && inquiryDetail.basic_info.eva_net_value !== "0.00" && inquiryDetail.eva_purpose !== "了解市场价值"'>净值1{{ (inquiryDetail.bank_name === "珠海华润银行")?"(扣全税)":""}}:{{number_format(inquiryDetail.basic_info.eva_net_value)}} 元</div>
|
||||
<div v-if='inquiryDetail.basic_info.eva_net_value2 !== 0 && inquiryDetail.basic_info.eva_net_value2 !== "0.00" && inquiryDetail.eva_purpose !== "了解市场价值"' class='mb-10'>净值2{{ (inquiryDetail.bank_name === "珠海华润银行")?"(仅扣个税)":""}}:{{number_format(inquiryDetail.basic_info.eva_net_value2)}} 元</div>
|
||||
</div>
|
||||
|
||||
<div v-if='inquiryDetail.bank_name === "珠海华润银行"'>
|
||||
<div>主动交易净值:{{number_format(inquiryDetail.basic_info.eva_total_value)}} 元</div>
|
||||
<div v-if='inquiryDetail.basic_info.eva_net_value !== 0 && inquiryDetail.basic_info.eva_net_value !== "0.00" && inquiryDetail.eva_purpose !== "了解市场价值"'>主动评估净值{{ (inquiryDetail.bank_name === "珠海华润银行")?"(扣全税)":""}} :{{number_format(inquiryDetail.basic_info.eva_net_value)}} 元</div>
|
||||
<div v-if='inquiryDetail.basic_info.eva_net_value2 !== 0 && inquiryDetail.basic_info.eva_net_value2 !== "0.00" && inquiryDetail.eva_purpose !== "了解市场价值"' class='mb-10'>被动动评估净值{{ (inquiryDetail.bank_name === "珠海华润银行")?"(仅扣个税)":""}} :{{number_format(inquiryDetail.basic_info.eva_net_value2)}} 元</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if='inquiryDetail.bank_name !== "中国建设银行" &&
|
||||
inquiryDetail.basic_info.eva_net_value !== 0 &&
|
||||
inquiryDetail.basic_info.eva_net_value !== "0.00" &&
|
||||
inquiryDetail.eva_purpose !== "了解市场价值"'
|
||||
>净值:{{number_format(inquiryDetail.basic_info.eva_net_value)}} 元</div>
|
||||
|
||||
<!-- 贷款金额 -->
|
||||
<div v-if='inquiryDetail.eva_purpose !== "了解市场价值"'>贷款金额:{{number_format(inquiryDetail.basic_info.gross_value, 0)}} 元 {{inquiryDetail.returnPrices[0].tips !== '' && inquiryDetail.returnPrices[0].tips !== null && inquiryDetail.bank_name !== '北京银行' ? `(${inquiryDetail.returnPrices[0].tips})` : ''}}</div>
|
||||
<div v-if='inquiryDetail.type == 1'>②二手房参考价:</div>
|
||||
<div v-if='inquiryDetail.type == 1'>参考单价:{{number_format(inquiryDetail.returnPrices[0].guide_price)}} 元/m²</div>
|
||||
<div v-if='inquiryDetail.type == 1'>参考总值:{{number_format((inquiryDetail.returnPrices[0].guide_price)*(inquiryDetail.returnPrices[0].size))}} 元</div>
|
||||
<div v-if='(inquiryDetail.bank_name === "中国银行" && inquiryDetail.type == 1)|| inquiryDetail.bank_name === "珠海华润银行"'>参考净值:{{number_format(getGuideNetWorth())}} 元</div>
|
||||
<div class='mb-10'>{{inquiryDetail.eva_purpose}}</div>
|
||||
<div>({{inquiryDetail.bank_name}}{{inquiryDetail.branch_bank_name}})</div>
|
||||
<div class='mb-10'>估价人员:{{inquiryDetail.appraiser_name}}</div>
|
||||
<div>{{inquiryDetail.external_remarks}}</div>
|
||||
</div>
|
||||
<button class="copy-button" @click="copyToClipboard">复制到粘贴板</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
inquiryDetail: {
|
||||
type: Object,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取指导价净值
|
||||
getGuideNetWorth()
|
||||
{
|
||||
let guideTotal = this.inquiryDetail.returnPrices[0].guide_price * this.inquiryDetail.basic_info.size; //参考净值总值
|
||||
return guideTotal - this.inquiryDetail.returnPrices[0].total_guide_tax; // 指导价净值 = 指导价总值 - 指导价总税
|
||||
},
|
||||
|
||||
number_format( n ){
|
||||
const formatter = new Intl.NumberFormat('zh-CN', {
|
||||
// style: 'currency',
|
||||
// currency: 'CNY',
|
||||
});
|
||||
return formatter.format(n);
|
||||
},
|
||||
|
||||
// 将cpoy-container的纯文本内容复制到手机剪贴板上
|
||||
copyToClipboard() {
|
||||
|
||||
let txt = document.getElementById('copy-container').innerText;
|
||||
console.log(txt)
|
||||
this.$emit('close-dialog');
|
||||
uni.setClipboardData({
|
||||
data: txt,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '已复制到剪贴板',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.dialog-content {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dialog-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialog-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
width: 180px;
|
||||
height: 45px;
|
||||
margin-left: auto;
|
||||
background-color: #409eff;
|
||||
vertical-align: bottom;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
274
pgapp/pages/inquiry/surveyApply.vue
Normal file
274
pgapp/pages/inquiry/surveyApply.vue
Normal file
@@ -0,0 +1,274 @@
|
||||
<template>
|
||||
|
||||
<view>
|
||||
<view class="uni-list" v-for="(item, findex) in surveyModalForm.details" :key="findex">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
物业<text class="require">*</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<text class="cu-tag">{{estateNameList[findex]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
联系人<text class="require">*</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<input v-model="surveyModalForm.details[findex].contact_name" maxlength="20" placeholder="请输入,最多50字" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
联系人电话<text class="require">*</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<input v-model="surveyModalForm.details[findex].contact_phone" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
小片区<text class="require">*</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db" v-if="smallAreaList.length > 0">
|
||||
<picker @change="onChangeSelect($event, 'small_area',findex)" :value="selectSmallAreaIndex[findex].index" range-key="name"
|
||||
:range="smallAreaList">
|
||||
<view>
|
||||
{{smallAreaList[selectSmallAreaIndex[findex].index]?smallAreaList[selectSmallAreaIndex[findex].index].name:''}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
查勘员<text class="require">*</text>
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<picker @change="onChangeSelect($event, 'surveyor',findex)" :value="selectSurveyorIndex[findex].index" range-key="userNickName"
|
||||
:range="surveyorList">
|
||||
<view>{{surveyorList[selectSurveyorIndex[findex].index]?surveyorList[selectSurveyorIndex[findex].index].userNickName:''}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-left">
|
||||
查勘备注
|
||||
</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<view class="uni-list-cell-db">
|
||||
<textarea class="uni-input" v-model="surveyModalForm.details[findex].remark" auto-height=true maxlength="150"
|
||||
placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='line'></view>
|
||||
|
||||
</view>
|
||||
<view class="button-sp-area">
|
||||
<button class='mini-btn' @click='cancel()' type="primary" size='mini'>取消</button>
|
||||
<button class='mini-btn' @click='suveryApply()' type="primary" size='mini'>提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
reqPropertyInfo,
|
||||
getSmallArea,
|
||||
getRole,
|
||||
askSurvey
|
||||
|
||||
} from '@/api/inquiry/inquiry'
|
||||
|
||||
import { toast } from '@/utils/common'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
estateNameList:[],
|
||||
surveyModalForm: {
|
||||
//order_no: this.$route.query.order_no,
|
||||
order_no: this.$route.query.order_no,
|
||||
details: [
|
||||
{
|
||||
property_cert_info_id: '',
|
||||
contact_name: '',
|
||||
contact_phone: '',
|
||||
area: '',
|
||||
area_id: '',
|
||||
remark: '',
|
||||
survey_user_id: '',
|
||||
survey_user_name: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
selectSmallAreaIndex: [{index:0}],
|
||||
selectSurveyorIndex: [{index:0}],
|
||||
|
||||
|
||||
smallAreaList: [],
|
||||
surveyorList: []
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
|
||||
await this.initSmallArea(this.$route.query.city_id);
|
||||
await this.initSurveyor();
|
||||
await this.initEstateInfo(this.$route.query.inquiry_id);
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
async initSurveyor() {
|
||||
let params = {roleCode:"Surveyor"}
|
||||
await getRole(params).then(res => {
|
||||
if (res.code === 1) {
|
||||
this.surveyorList = res.data
|
||||
} else {
|
||||
toast(res.msg)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
async initEstateInfo(inquiry_id) {
|
||||
let params = {quot_id:inquiry_id}
|
||||
await reqPropertyInfo(params).then(res => {
|
||||
if (res.code === 1) {
|
||||
let estateList = res.data
|
||||
console.log("initEstateInfo initEstateInfo:",estateList );
|
||||
estateList.forEach((item,index)=>{
|
||||
this.estateNameList.push(item.building_name)
|
||||
if(index == 0) {
|
||||
this.surveyModalForm.details[0].property_cert_info_id = item.id
|
||||
this.surveyModalForm.details[0].area = this.smallAreaList[0].name
|
||||
this.surveyModalForm.details[0].area_id = this.smallAreaList[0].id
|
||||
this.surveyModalForm.details[0].survey_user_id = this.surveyorList[0].userId
|
||||
this.surveyModalForm.details[0].survey_user_name = this.surveyorList[0].userNickName
|
||||
}else {
|
||||
this.selectSmallAreaIndex.push({index:0})
|
||||
this.selectSurveyorIndex.push({index:0})
|
||||
this.surveyModalForm.details.push({
|
||||
property_cert_info_id: item.id,
|
||||
contact_name: '',
|
||||
contact_phone: '',
|
||||
area: this.smallAreaList[0].name,
|
||||
area_id: this.smallAreaList[0].id,
|
||||
remark: '',
|
||||
survey_user_id: this.surveyorList[0].userId,
|
||||
survey_user_name: this.surveyorList[0].userNickName
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initSmallArea(city_id) {
|
||||
let params = {id:city_id}
|
||||
await getSmallArea(params).then(res => {
|
||||
if (res.code === 1) {
|
||||
let samllAreaObj = res.data
|
||||
for (let i in samllAreaObj) {
|
||||
let id = i;
|
||||
let name = samllAreaObj[i];
|
||||
this.smallAreaList.push({id:id,name:name});
|
||||
}
|
||||
} else {
|
||||
toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
suveryApply() {
|
||||
askSurvey(this.surveyModalForm).then(res => {
|
||||
if (res.code === 1) {
|
||||
this.$tab.navigateTo('/pages/inquiry/index')
|
||||
} else {
|
||||
toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.$tab.navigateTo('/pages/inquiry/index')
|
||||
},
|
||||
onChangeSelect(event, name, index, item) {
|
||||
if (!event) {
|
||||
return
|
||||
}
|
||||
|
||||
switch (name) {
|
||||
|
||||
case 'small_area':
|
||||
this.selectSmallAreaIndex[index].index = event.detail.value
|
||||
this.surveyModalForm.details[index].area = this.smallAreaList[this.selectSmallAreaIndex[index].index].name
|
||||
this.surveyModalForm.details[index].area_id = this.smallAreaList[this.selectSmallAreaIndex[index].index].id
|
||||
|
||||
break
|
||||
case 'surveyor':
|
||||
this.selectSurveyorIndex[index].index = event.detail.value
|
||||
this.surveyModalForm.details[index].survey_user_id = this.surveyorList[this.selectSurveyorIndex[index].index].userId
|
||||
this.surveyModalForm.details[index].survey_user_name = this.surveyorList[this.selectSurveyorIndex[index].index].userNickName
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 将 mask 缩小到一行 */
|
||||
.uni-popup-mask {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
/* 将 mask 演示为浅蓝色 */
|
||||
.uni-popup-mask::before {
|
||||
background-color: #e6f1ff;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.btn {
|
||||
color: #ff6a00;
|
||||
border: 1px;
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
.require {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 5rpx;
|
||||
background-color: #E6E6E6;
|
||||
}
|
||||
|
||||
.line2 {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.button-sp-area {
|
||||
margin: 0 auto;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mini-btn {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user