This commit is contained in:
花有清香月有阴
2022-02-24 16:38:44 +08:00
parent 0922aae4f1
commit 131ac90bdf
2 changed files with 27 additions and 29 deletions

View File

@@ -2,14 +2,12 @@
<div class="add">
<div class="u-forms">
<u-form class="u-form" :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="申请人" prop="name" required :border-bottom="false">
<u-input v-model="forms.name" placeholder="请输入申请人" maxlength="30" />
<u-form-item label="申请人" prop="realName" required :border-bottom="false">
<u-input v-model="user.realName" disabled maxlength="30" />
</u-form-item>
<u-form-item label="申请时间" prop="auditTime" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.auditTime" disabled placeholder="请选择申请时间" @click="showStartTime = true" />
<u-calendar mode="date" v-model="showStartTime" @change="changeCalendar"></u-calendar>
<u-form-item label="申请时间" prop="auditTime" required :border-bottom="false">
<u-input v-model="toDay" disabled placeholder="请选择申请时间" />
</u-form-item>
<div class="line"></div>
@@ -21,7 +19,7 @@
</u-form-item>
<u-form-item label="申请描述" prop="description" required :border-bottom="false" label-position="top" class="contents">
<u-input v-model="forms.description" placeholder="请输入详细描述信息" type="textarea" :auto-height="true" maxlength="500" />
<u-input v-model="forms.description" placeholder="请输入描述信息" type="textarea" :auto-height="true" maxlength="500" />
</u-form-item>
<div class="wordLength">{{ forms.description.length }}/500</div>
@@ -58,21 +56,18 @@ export default {
},
showStstus: false,
flag: false,
showStartTime: false,
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: false,
timestamp: true,
},
toDay: '',
}
},
computed: { ...mapState(['user']) },
onLoad() {
this.$dict.load('atWillReportType').then(() => {})
this.$dict.load('atWillReportType').then(() => {
var toDay = new Date()
var year = toDay.getFullYear()
var month = toDay.getMonth() + 1 < 10 ? '0' + (toDay.getMonth() + 1) : toDay.getMonth() + 1
var data = toDay.getDate() < 10 ? '0' + toDay.getDate() : toDay.getDate()
this.toDay = year + '-' + month + '-' + data
})
},
onShow() {},
@@ -86,9 +81,6 @@ export default {
if (!this.forms.name) {
return this.$u.toast('请输入申请人')
}
// if (!this.forms.auditTime) {
// return this.$u.toast('请选择申请时间')
// }
if (!this.forms.applyIntegralType) {
return this.$u.toast('请选择积分类型')
@@ -107,7 +99,7 @@ export default {
this.flag = true
this.$instance
.post(`/app/appvillagerintegraldeclare/addOrUpdate`, {
name: this.forms.name,
name: this.user.realName,
applyIntegralType: this.forms.applyIntegralTypeValue,
description: this.forms.description,
applyFiles: imgs || [],
@@ -154,8 +146,11 @@ export default {
::v-deep .u-form {
background: #fff;
.u-form-item {
padding: 0 45px !important;
padding: 0;
.u-form-item__body {
padding: 40px 0 !important;
margin: 0 45px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
@@ -165,13 +160,10 @@ export default {
}
}
.u-form-item:last-child {
margin-bottom: 40px;
}
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
box-shadow: none;
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
@@ -199,6 +191,11 @@ export default {
}
}
.u-form-item:last-child {
// margin-bottom: 40px;
// padding: 40px 0 !important;
}
.line {
height: 24px;
background: #f3f6f9;
@@ -223,6 +220,7 @@ export default {
font-size: 32px;
font-weight: 500;
color: #ffffff;
z-index: 999;
}
}
</style>