Commit 8f6d420c by kyle

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

parent c3d5f62e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<script> <script>
export default{ export default{
data(){ data(){
return{}
}, },
name:'foot', name:'foot',
components:{ components:{
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<script> <script>
export default{ export default{
data(){ data(){
return{}
}, },
name:'head', name:'commonHead',
components:{ components:{
}, },
onLoad(){ onLoad(){
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="wrapper"> <view class="wrapper">
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<head></head> <commonHead></commonHead>
<img src="../../static/images/banner.png" alt="banner" srcset=""> <img src="../../static/images/banner.png" alt="banner" srcset="">
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
...@@ -106,9 +106,12 @@ ...@@ -106,9 +106,12 @@
<!--房屋置换--> <!--房屋置换-->
<view class="houseInfo"> <view class="houseInfo">
<view class="title"> <view class="title">
<view class="radioButton" :class="{'selected':isDisplace }" <view style="display: flex;">
@click="openLoan()"></view> <view class="radioButton" :class="{'selected':isDisplace }"
<text style="margin-left: 10rpx;">是否置换旧房</text> @click="openLoan()"></view>
<text style="margin-left: 10rpx;">是否置换旧房</text>
</view>
<view class="editParam" v-if="dataLists" @click="editParams()">修改参数</view>
</view> </view>
<view v-if="dataLists"> <view v-if="dataLists">
<loanBalance :isReadonly="true" :a="accumulationFundParams" :b="commercialLoansParams" @getData="getData"></loanBalance> <loanBalance :isReadonly="true" :a="accumulationFundParams" :b="commercialLoansParams" @getData="getData"></loanBalance>
...@@ -192,7 +195,7 @@ ...@@ -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> <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> </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> <planningParameters v-if="paramsSelected"></planningParameters>
</view> </view>
...@@ -203,7 +206,7 @@ ...@@ -203,7 +206,7 @@
import {toRefs} from "vue"; import {toRefs} from "vue";
import loanBalance from './loanBalance.vue'; import loanBalance from './loanBalance.vue';
import planningParameters from './planningParameters.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 foot from '../footer/footer.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import api from '../../api/api'; import api from '../../api/api';
...@@ -213,6 +216,7 @@ ...@@ -213,6 +216,7 @@
export default{ export default{
data(){ data(){
return{ return{
isEditFlag:false,
dataLists:null, dataLists:null,
dialogIsShow:false,//弹窗显示与隐藏 dialogIsShow:false,//弹窗显示与隐藏
isDisplace:false, isDisplace:false,
...@@ -256,13 +260,16 @@ ...@@ -256,13 +260,16 @@
components:{ components:{
loanBalance, loanBalance,
planningParameters, planningParameters,
head, commonHead,
foot foot
}, },
onLoad(){ onLoad(){
this.provCityQry(); this.provCityQry();
}, },
methods:{ methods:{
editParams(){
this.dialogIsShow = this.isEditFlag = true;
},
getData(e){ getData(e){
this.dataLists = toRefs(e); this.dataLists = toRefs(e);
this.accumulationFundParams = this.dataLists.a; this.accumulationFundParams = this.dataLists.a;
...@@ -442,7 +449,15 @@ ...@@ -442,7 +449,15 @@
.wrapper{ .wrapper{
.houseInfo .title{ .houseInfo .title{
padding-left: 0; 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{ .houseInfo .title::before{
width: 0; width: 0;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div v-else-if="item.type==='select'" style="width:55%"> <div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper"> <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> </view>
</div> </div>
</li> </li>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<div v-else-if="item.type==='select'" style="width:55%"> <div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper"> <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> </view>
</div> </div>
</li> </li>
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
</view> </view>
</view> </view>
<view class="footer" v-if="!isReadonly"> <view class="footer" v-if="!isReadonly">
<view @click="save()">保存</view> <view @click="save()" class="save">保存</view>
<view @click="clear()" class="clear">清空</view>
</view> </view>
</div> </div>
</template> </template>
...@@ -57,17 +58,15 @@ ...@@ -57,17 +58,15 @@
emits:['getData'], emits:['getData'],
data(){ data(){
return{ return{
slectedMethod:1,
slectedMethod1:1,
accumulationFundParams:[ accumulationFundParams:[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'}, {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:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'}, {id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
], ],
commercialLoansParams:[ commercialLoansParams:[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'}, {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:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'}, {id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
], ],
...@@ -105,10 +104,10 @@ ...@@ -105,10 +104,10 @@
return {loanType,sendData,a,b,isReadonly} return {loanType,sendData,a,b,isReadonly}
}, },
mounted(){ 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; 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; 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)){ 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 @@ ...@@ -120,6 +119,20 @@
} }
}, },
methods:{ 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){ selectLoanType(e){
this.loanType = e; this.loanType = e;
}, },
...@@ -378,17 +391,29 @@ ...@@ -378,17 +391,29 @@
} }
} }
.footer{ .footer{
width: 300rpx; position: relative;
height: 80rpx;
background: linear-gradient(135deg, #CEB07D 0%, #FFDDA9 56%, #FED495 100%, #FED495 100%);
border-radius: 4px;
font-size: 36rpx;
color: #6B4000;
font-weight: 500;
margin: 20px auto; margin: 20px auto;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; .save{
width: 300rpx;
height: 80rpx;
background: linear-gradient(135deg, #CEB07D 0%, #FFDDA9 56%, #FED495 100%, #FED495 100%);
border-radius: 4px;
font-size: 36rpx;
color: #6B4000;
font-weight: 500;
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 @@ ...@@ -12,7 +12,7 @@
<img src="/static/images/policyIrrBanner.png" alt="" srcset=""> <img src="/static/images/policyIrrBanner.png" alt="" srcset="">
<!-- 使用说明 --> <!-- 使用说明 -->
<text @click="instructionForUse()">使用说明</text> <text @click="instructionForUse()">使用说明</text>
<head></head> <commonHead></commonHead>
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
<view class="tabTitle"> <view class="tabTitle">
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
import dataImport from "../dataImport/data-import.vue"; import dataImport from "../dataImport/data-import.vue";
import { inject } from "vue"; import { inject } from "vue";
import foot from '../footer/footer.vue'; import foot from '../footer/footer.vue';
import head from '../header/header.vue'; import commonHead from '../header/header.vue';
export default { export default {
data() { data() {
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
components:{ components:{
dataImport, dataImport,
foot, foot,
head commonHead
}, },
onLoad() { onLoad() {
if(!uni.getStorageSync('businessNo')){ 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