更改阳上人往生者

This commit is contained in:
2022-03-21 18:09:42 +08:00
parent ec94965858
commit 2f4bd26b22
10 changed files with 81 additions and 33 deletions
+51 -23
View File
@@ -5,16 +5,30 @@
<div class="field">
<label class="required">功德芳名</label>
<div class="input-wrapper">
<input class="input" :value="meritName" type="text" readonly placeholder="请填写功德主姓名" @click="onShowDialog('name')">
<input class="input" :value="meritName" type="text" readonly placeholder="请输入功德芳名" @click="onShowDialog('name')">
</div>
</div>
<div class="field">
<label >心愿</label>
<label >心愿</label>
<div class="input-wrapper" @click="onShowDesire">
<textarea class="input" v-model="dream" placeholder="请填写您的心愿" readonly type="textarea" />
<i class="iconfont icon-arrow-right"></i>
</div>
</div>
<template v-if="query.is_die == '1'">
<div class="field">
<label class="required">阳上人</label>
<div class="input-wrapper">
<input class="input" v-model="live_name" type="tel" placeholder="请填写阳上人">
</div>
</div>
<div class="field">
<label class="required">往生者</label>
<div class="input-wrapper">
<input class="input" v-model="die_name" type="tel" placeholder="请填写往生者">
</div>
</div>
</template>
<div class="field">
<label >手机号码</label>
<div class="input-wrapper">
@@ -25,7 +39,7 @@
</div>
<div class="btn-wrapper">
<span class="total">合计: ¥{{query.amount}}</span>
<span class="total">合计: <b class="price">¥{{query.amount}}</b></span>
<button type="button" @click="onNext">下一步</button>
</div>
@@ -36,7 +50,6 @@
</template>
<script>
export default {
name: 'fill-name',
data(){
@@ -48,7 +61,12 @@ export default {
dialogName: '',
showMeritName: false,
showDesire: false,
merit_names: []
merit_names: [],
meritTypes: [],
meritTypeId: null,
showBuddhi: true,
live_name: '', // 阳上人姓名
die_name: '', // 往生人姓名
}
},
computed: {
@@ -57,12 +75,11 @@ export default {
},
meritId(){
return this.merit_names.map(item => item.id).join(',')
}
},
},
created() {
},
methods: {
onShowDialog(){
this.showMeritName = true;
},
@@ -79,18 +96,10 @@ export default {
if(!this.meritId){
return this.$toast.fail('请填写功德芳名');
}
// if(!this.dream){
// return this.$toast.fail('请填写心愿');
// }
// if(!this.mobile){
// return this.$toast.fail('请填写功德主手机号');
// }
console.log('query', {
...this.$route.query,
dream: this.dream,
merit_name: this.meritName,
mobile: this.mobile,
})
if(this.query.is_die == 1 && (!this.live_name || !this.die_name)){
return this.$toast.fail('请填写阳上人与往生人')
}
this.$router.push({
name: 'pay',
query: {
@@ -98,13 +107,24 @@ export default {
dream: this.dream,
merit_name: this.meritName,
mobile: this.mobile,
live_name: this.live_name,
die_name: this.die_name
}
})
}
}
};
</script>
<style lang="scss">
.fill-name{
.field{
.van-radio__icon--checked .van-icon{
background: #CF9E3B;
border-color: #CF9E3B;
}
}
}
</style>
<style scoped lang="scss">
.fill-name{
background: #f9f9f9;
@@ -121,7 +141,7 @@ export default {
box-shadow: 0 0 .2rem rgba(0,0,0,0.05);
}
.field{
margin-bottom: .8rem;
margin-bottom: .6rem;
.required{
&::after{
content: '*';
@@ -132,16 +152,19 @@ export default {
label{
color: #333;
}
.input-wrapper{
margin-top: .2rem;
border: 1px solid rgba(183, 173, 173, 0.54);
padding: .2rem .3rem;
border-radius: .1rem;
position: relative;
background: #fdfdfd;
.input{
display: block;
width: 100%;
border: none;
background: transparent;
}
.input[type=textarea]{
min-height: 2rem;
@@ -175,8 +198,13 @@ export default {
align-items: center;
.total{
font-size: .4rem;
color: #666666;
color: $primary-color;
padding-left: .4rem;
.price{
font-size: .5rem;
line-height: 1;
font-weight: bold;
}
}
button{
background: linear-gradient(to bottom, $primary-color, #9f7313);