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

@@ -56,8 +56,8 @@ export default {
}, },
onLoad() { onLoad() {
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
this.areaId = this.$areaId this.areaId = this.$areaId
this.areaName = this.$areaName this.areaName = this.$areaName
this.getList() this.getList()
}, },

View File

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