Commit 8f6d420c by kyle

增加清空操作,hear重新命名

parent c3d5f62e
......@@ -8,7 +8,7 @@
<script>
export default{
data(){
return{}
},
name:'foot',
components:{
......
......@@ -8,9 +8,9 @@
<script>
export default{
data(){
return{}
},
name:'head',
name:'commonHead',
components:{
},
onLoad(){
......
......@@ -2,7 +2,7 @@
<view class="wrapper">
<view class="banner">
<!--头部技术支持组件-->
<head></head>
<commonHead></commonHead>
<img src="../../static/images/banner.png" alt="banner" srcset="">
</view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
......@@ -106,10 +106,13 @@
<!--房屋置换-->
<view class="houseInfo">
<view class="title">
<view style="display: flex;">
<view class="radioButton" :class="{'selected':isDisplace }"
@click="openLoan()"></view>
<text style="margin-left: 10rpx;">是否置换旧房</text>
</view>
<view class="editParam" v-if="dataLists" @click="editParams()">修改参数</view>
</view>
<view v-if="dataLists">
<loanBalance :isReadonly="true" :a="accumulationFundParams" :b="commercialLoansParams" @getData="getData"></loanBalance>
</view>
......@@ -192,7 +195,7 @@
<svg t="1663922894848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2545" width="26" height="26"><path d="M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z" p-id="2546"></path></svg>
</div>
<!--旧房贷款余额组件-->
<loanBalance v-if="isLoanSelected" :loanType="1" @getData="getData"></loanBalance>
<loanBalance v-if="isLoanSelected" :a="accumulationFundParams" :b="commercialLoansParams" :loanType="1" @getData="getData"></loanBalance>
<!--规划参数组件-->
<planningParameters v-if="paramsSelected"></planningParameters>
</view>
......@@ -203,7 +206,7 @@
import {toRefs} from "vue";
import loanBalance from './loanBalance.vue';
import planningParameters from './planningParameters.vue';
import head from '../header/header.vue';
import commonHead from '../header/header.vue';
import foot from '../footer/footer.vue';
import * as echarts from 'echarts';
import api from '../../api/api';
......@@ -213,6 +216,7 @@
export default{
data(){
return{
isEditFlag:false,
dataLists:null,
dialogIsShow:false,//弹窗显示与隐藏
isDisplace:false,
......@@ -256,13 +260,16 @@
components:{
loanBalance,
planningParameters,
head,
commonHead,
foot
},
onLoad(){
this.provCityQry();
},
methods:{
editParams(){
this.dialogIsShow = this.isEditFlag = true;
},
getData(e){
this.dataLists = toRefs(e);
this.accumulationFundParams = this.dataLists.a;
......@@ -442,7 +449,15 @@
.wrapper{
.houseInfo .title{
padding-left: 0;
justify-content: flex-start;
justify-content: space-between;
.editParam{
font-size: 26rpx;
color: #666;
border: 1px solid #CEB07D;
padding: 4rpx 16rpx;
border-radius: 6rpx;
font-weight: normal;
}
}
.houseInfo .title::before{
width: 0;
......
......@@ -18,7 +18,7 @@
</div>
<div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper">
<button class="min-btn" @click="slectedMethod1=listItem.value;item.value=listItem.value" :class="{actived:slectedMethod1 == listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
<button class="min-btn" @click="item.value=listItem.value" :class="{actived:item.value==listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
</view>
</div>
</li>
......@@ -37,7 +37,7 @@
</div>
<div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper">
<button class="min-btn" @click="slectedMethod=listItem.value;item.value=listItem.value" :class="{actived:slectedMethod == listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
<button class="min-btn" @click="item.value=listItem.value" :class="{actived:item.value==listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
</view>
</div>
</li>
......@@ -45,7 +45,8 @@
</view>
</view>
<view class="footer" v-if="!isReadonly">
<view @click="save()">保存</view>
<view @click="save()" class="save">保存</view>
<view @click="clear()" class="clear">清空</view>
</view>
</div>
</template>
......@@ -57,17 +58,15 @@
emits:['getData'],
data(){
return{
slectedMethod:1,
slectedMethod1:1,
accumulationFundParams:[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'公积金还款方式',value:null,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'01',text:'公积金还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
],
commercialLoansParams:[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'商业还款方式',value:null,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'01',text:'商业还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
],
......@@ -105,10 +104,10 @@
return {loanType,sendData,a,b,isReadonly}
},
mounted(){
if(JSON.stringify(this.a) != '{}'){
if(JSON.stringify(this.a) != '{}' && JSON.stringify(this.a) != '[]'){
this.accumulationFundParams = JSON.parse(JSON.stringify(this.a))[0]._object;
}
if(JSON.stringify(this.b) != '{}'){
if(JSON.stringify(this.b) != '{}' && JSON.stringify(this.b) != '[]'){
this.commercialLoansParams = JSON.parse(JSON.stringify(this.b))[0]._object;
}
if(!(this.accumulationFundParams.findIndex(item=>item.value==null || item.value == '') >= 0) && !(this.commercialLoansParams.findIndex(item=>item.value==null || item.value == '') >= 0)){
......@@ -120,6 +119,20 @@
}
},
methods:{
clear(){
this.accumulationFundParams=[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'公积金还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
];
this.commercialLoansParams=[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'商业还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
]
},
selectLoanType(e){
this.loanType = e;
},
......@@ -378,6 +391,11 @@
}
}
.footer{
position: relative;
margin: 20px auto;
display: flex;
justify-content: center;
.save{
width: 300rpx;
height: 80rpx;
background: linear-gradient(135deg, #CEB07D 0%, #FFDDA9 56%, #FED495 100%, #FED495 100%);
......@@ -385,11 +403,18 @@
font-size: 36rpx;
color: #6B4000;
font-weight: 500;
margin: 20px auto;
display: flex;
justify-content: center;
align-items: center;
}
.clear{
position: absolute;
right: 0;
bottom: 0;
border-bottom: 1px solid #000;
padding: 0 10rpx;
}
}
}
......
......@@ -12,7 +12,7 @@
<img src="/static/images/policyIrrBanner.png" alt="" srcset="">
<!-- 使用说明 -->
<text @click="instructionForUse()">使用说明</text>
<head></head>
<commonHead></commonHead>
</view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
<view class="tabTitle">
......@@ -205,7 +205,7 @@
import dataImport from "../dataImport/data-import.vue";
import { inject } from "vue";
import foot from '../footer/footer.vue';
import head from '../header/header.vue';
import commonHead from '../header/header.vue';
export default {
data() {
......@@ -238,7 +238,7 @@
components:{
dataImport,
foot,
head
commonHead
},
onLoad() {
if(!uni.getStorageSync('businessNo')){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment