first commit
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user