Files
zhgh_hmc/src/main/resources/views/mobile/condolence/school_Audit.html
T
2024-11-29 09:03:59 +08:00

172 lines
6.3 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar @click-left="pjaxReplace('/mobile/condolence/audit')" fixed left-arrow placeholder
title="慰问审核"></van-nav-bar>
<condolence-info :handle="handle" :id.sync="id" ref="info" title="校工会主席审核">
<template #handle>
<div class="van-cell-group__title mt10">
<div class="van-sidebar-item van-sidebar-item--select">
校工会主席审核
</div>
</div>
<van-form>
<van-field label="审核人员"
left-icon="contact"
name="username"
readonly
value="${@shiro.getPrincipalProperty('username')}"
></van-field>
<van-field label="审核时间" left-icon="clock-o" readonly
v-model="formData.time"></van-field>
<van-field :rules="[{ required:true, message: '请输入慰问金额' }]" label="慰问金额"
left-icon="balance-list-o"
required
type="number" v-model="formData.money"
></van-field>
<van-field @click="typePicker = true" label="审核类型" left-icon="clock-o"
readonly required v-model="auditType"></van-field>
<van-popup position="bottom" v-model="typePicker">
<van-picker
:columns="['审核通过','审核通过(线下提交资料)', '审核拒绝']"
@cancel="typePicker = false"
@confirm="typeChange"
show-toolbar
></van-picker>
</van-popup>
<van-field autosize
label="审核意见"
left-icon="chat-o"
placeholder="请输入审核意见"
required
rows="1"
type="textarea"
v-model="formData.opinion"
></van-field>
<van-field label="签字" required style="flex-flow: column">
<template #label>
<div class="mb10">&emsp;&emsp;</div>
</template>
<template #input>
<mobile-sign :my_sign.sync="formData.sign" ref="signature"></mobile-sign>
</template>
</van-field>
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
<van-col span="8">
<van-button :color="themeColor" @click="doAudit(1)" block plain>拒 绝
</van-button>
</van-col>
<van-col span="8">
<van-button @click="doAudit(2)" block color="red" plain>返回修改
</van-button>
</van-col>
<van-col span="8">
<van-button :color="themeColor" @click="doAudit(3)" block>通 过
</van-button>
</van-col>
</van-row>
</van-form>
</template>
</condolence-info>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
typePicker: false,
auditType: '审核通过',
handle: true,
id: "",
formData: {},
}
},
components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
},
methods: {
typeChange(value, index) {
if (value === '审核通过') {
this.formData.opinion = '情况属实,同意申请。'
} else if (value === '审核通过(线下提交资料)') {
this.$set(this.formData, 'opinion', '请将纸质发票经办人、分工会主席签字后交至行政楼A426办公室。')
} else {
this.formData.opinion = ''
}
this.typePicker = false
},
async doAudit(pass) {
if (!this.formData.opinion) {
this.$toast.fail('请填写审核意见');
return
}
this.$refs.signature.submitSign()
if (pass === 3 && this.$refs.signature.checkNull()) {
vant.Toast('请签名!')
return
}
await this.$refs.signature.updateSign()
this.formData.pass = pass
if (this.auditType === '审核通过(线下提交资料)') {
pass = 4
}
const loading = this.$toast.loading({
message: '加载中...',
forbidClick: true,
overlay: true,
duration: 0
})
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
if (resp.code === 0) {
setTimeout(() => {
this.$toast.success('审核成功');
pjaxReplace("/mobile/condolence/audit")
}, 500)
} else {
loading.close()
this.$toast.fail('审核失败');
}
},
},
async created() {
this.id = GetQueryString("id")
const {data} = await $.get("/platform/fw/condolence/findOne", {id: this.id})
this.formData = {
id: this.id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
opinion: '情况属实,同意申请。',
sign: "",
money: data.money
}
}
})
</script>
<!--#
}
#-->